added socket.io api and gave basic chat functionality