Inject before_filter methods to ActionController::Base

This pull request adds some hackery to how we call `login_required`. This was done, so we can call `login_required` inside Rails engines.