Moved logic to server and implemented proof-of-concept Websocket communication