Added hooks for authentication