Mechanism of sessions in WebSocket server