Error handling (when no cookies in server.js and during opening websocket)