Fix htmlfill when multiple forms are present

Currently, htmlfilll always picks the first form it can find in the HTML code, and that is usually the inline form.
Instead, we should render just the login tile, pass it to htmlfill, and then paste it into the rest of the template.
Fixes #423.