Workaround CORS not being supported by WebSocket
Currently any web browser tab can create a websocket connection to the
server and pretend to be a native client. So let the client register
itself and make the server check if this is a legitimate client by
creating a HTTP request which only a service on the host computer can
handle.