implemented socket.io functionality for /join