start of websocket authentication