updated to include socket.io and chat functionality