update login_required to support check_auth