Added templates and login functionality