minor bugfixes, changed login form to template engine