Added code for chat client and server