add the ability to use an on_auth_failure block when a 401 is detected