implemented client for sending messages to server.
implemented output thread for receiving messages from the server