Move connected_to_client to sockets.js