Fixed index_controller to inherit from ApplicationController.