Change get_authorization_url to function