"flash" handling to compatible with Mojolicious::Sessions

took some code from Mojolicious::Sessions