Fixed AuthenticatedSystem-related error in Application_controller