Added functionality to server

Websocket command is killed in the event of losing websocket connection.