move websocket related stuff to websockets.js. Use sockets.emit instead of keep track of the socket ourselves