Add hooks for authentication success and failure