Add hooks for authentication success and failure
Merge remote-tracking branch 'origin/mc-failed_auth_hook'