'Handle login failure by presenting either another challenge (for
expected authentication/authorization-related failures) or a server
error page (for anything else).'

def _loginFailed(self, result):

    if result.check(error.Unauthorized, error.LoginFailed):
        return UnauthorizedResource(self._credentialFactories)
    else:
        log.err(result, 'HTTPAuthSessionWrapper.getChildWithDefault    encountered    unexpected    error')
        return ErrorPage(500, None, None)
