Page rewriting demo
This demonstrates page-caching with javascript rewriting. Please view the whole article which explains what's going on here.
Set your username here -- this would normally be done programmatically.
In your app, retrieve this username from cookies or rails (from the script).
You can also see what's going on here:
show/hide the login form
show/hide the auth box