define register and login routes and added templates