Webserver and websocket moved to its own thread