fix check for auth errors, return other errors.