Refactored Client.generate_client_id