Ssl and login generator

I am using rails with lighttpd, ssl and login-generator gem.

my problem is that i can login securely but any controller that has

before_filter :login_required

does not recognize that i am logged in and kicks me back to the login
screen?

help.