Implemented the Client.lock() and Client.unlock() methods