Fixed templates and forms.
Added login page.
Refactor.