How do I disconnect when logging out

When I log out from the application I want to disconnect the session - how do I do that?

You should call unregister on the device