Implemented client.connect()