Merging of chat interface and chat server from socket.io example