Socket based chat application with socket.io node library