Do not create socket only to get a session id
Work around issues with sessions, multiple workers

Currently, there is no built-in mechanism for sharing sessions across
multiple workers. This change removes an assumption about the existence
of a session to allow websocket communication with multiple
workers that does not rely on the built-in sessions.