Bug fix for websocket connection on login/logout.