add login template
refactor
update