Use descendants of ActionController::Base instead of ApplicationController.