insert middleware before ActionDispatch::Flash so that ActionDispatch::S...

I tested that this works with both `ActionDispatch::Session::CookieStore` and `ActionDispatch::Session::ActiveRecordStore`. Perhaps you know a cleaner (XPath?) syntax to accomplish this?

Also a small Javascript syntax fix for the README.md.