Added automatic authentication to websocket connections.