Question-The page isn't redirecting properly

I'm running into a problem where Firefox is returning this error page
"The page isn't redirecting properly
Firefox has detected that the server is redirecting the request for
this address in a way that will never complete.
This problem can sometimes be caused by disabling or refusing to
accept cookies."

Cookies though are enabled so that is not the problem. Now I'm using
restful_authentication plugin. I have set this in my application.rb
controller file -

include AuthenticatedSystem
before_filter :login_required

The login_required method looks like it should redirect to my login page:

def login_required
      username, passwd = get_auth_data
      self.current_user ||= User.authenticate(username, passwd) ||
:false if username && passwd
      logged_in? && authorized? ? true : access_denied

and here is access_denied
def access_denied
      respond_to do |accepts|
        accepts.html do
          redirect_to :controller => 'sessions', :action => 'new'

So as the code above reflects the redirect is attempting to go to
sessions/new and it does reflect that in the browser url , however
instead of displaying the login page I get the above error. Any ideas


Thank you Frederick, I put the skip skip_before_filter in the sessions
controller and it's redirecting correctly. Just seemed that the
access_denied method was set up for that specific reason. I gather
it's because logged_required is in the application controller.