refactored the authenticate admin method into the application controller