Added socket.io functionality