Login, templates cleanup