added templates and login