code: def _authenticate_websocket(self, websocket, event_handler):
  		
  		log.debug('Authenticating websocket')
  		json_data = json.dumps({
  			"seq": 1,
  			"action": "authentication_challenge",
  			"data": {
  				"token": self._token
  			}
  		}).encode('utf8')
  		yield from websocket.send(json_data)
  		while True:
  			message = yield from websocket.recv()
  			status = json.loads(message)
  			log.debug(status)
  			# We want to pass the events to the event_handler already
  			# because the hello event could arrive before the authentication ok response
  			yield from event_handler(message)
  			if ('status' in status and status['status'] == 'OK') and \
  					('seq_reply' in status and status['seq_reply'] == 1):
  				log.info('Websocket authentification OK')
  				return True
  			elif 'seq_reply' in status and status['seq_reply'] == 1:
  				log.error('Websocket authentification failed')
docs: Sends a authentication challenge over a websocket.
  		This is not needed when we just send the cookie we got on login
  		when connecting to the websocket.