added template and login