Added WebSocket handling