Well-behaved authentication model / post-backs

Hello,

I am new to rails/ruby.

I have been experimenting with simple authentication filters…
filtering protected controllers with an authentication action that
delegates authentication to an authentication controller and the
underlying “Person” model.

When the user is in the process of a http GET, either via bookmark or
otherwise, it’s easy to ‘bring them back’ to where they were via
redirect_to :back or storing back-uris as session variables and
redirecting.

What I am looking for is a complete idiom to seamlessly interject
authentication mid-stream without disrupting workflow–for posts and
gets with arbitrary parameters.

Key use case: user fills out a huge form, but goes to bed before
submitting. The next day, he/she submits the form but their session is
expired. They should be prompted for a login, then the post should
proceed without any loss.

How is this done?
Thanks