Improves HtmlFormat to have session and flash message handling