better handling of auth failures

Allows you to override how Auth failures are handled in a plugin.