How to redirect out from a render partial-action?

Hi!

I have a "are you logged in"-check in my application.rb that looks like
this:

before_filter :is_logged_in

def is_logged_in()
  if(!session[:userID) then
    reset_session
    redirect_to :controller => "login"
       end
end

This works great most of the time. The problem is when the redirect_to
triggers when a user has been clicking on an action that renders a
partials into a div. Then the login-page shows up inside of that div :frowning:
Is there a way to "break out" from that div so that the redirect always
goes to an own page? Sort of like target="_top" in html :smiley:

Anyone?