add login template and view function