Synchronising log out of discourse when logging out of WordPress

I was mixing methods - using a combination of the embed method described here: Embedding Discourse Comments via Javascript

and the plugin. I have sent you a PM about this.

And I have tested the synchronised log out - it works when logging out of WordPress first, but not when logging out of discourse first. Is this the expected behaviour? Ideally I would like it to work both ways.

Thanks!