Refactoring: Passing client_id and client_secret via parameter to log in (client_credentials)