Updated application_controller