Hooks in application controller