Insert middlewares before ActionDispatch::Cookies if possible
Insert middlewares before ActionDispatch::Cookies if possible

* Otherwise registrar-rails would have no access to a persistence application session

neopoly/registrar,JanOwiesniak/registrar