created chat server

refined chat client and created chat server