Handles passing of information between client and server using websocket