Moved page authentication to app_controller