updated login template and controller