Added flash to controller for unauthorized access