Creating a simple chat app using sockets