Add the function onHtmlError to the auth typeclass so users can customize behavior on authentication errors.