Restoring original parameters along with URI

Hi,

I redirect people to login page for those who have not logged in. I use
:before_filter to do this. I store the original Uri in session so that
when he logs in I redirect to. But parameters are not getting store

in my :before_filter
I do:
session[:original_uri] = request.request_uri

In login controller:
uri = session[:original_params]
session[:original_uri] = nil
redirect_to(uri || { :controller => “account”, :action =>
“my_home” })

But if i do this, parameters of the original request are saved and are
not forwarded during the redirection.

I tried saving params in before_filter :
session[:original_params] = params
and tried resetting,
uri = session[:original_params]

But this didnt really do the trick.

Can someone please suggest.

Regards,
SG