Fix typo in api_login_required method