refactored logging in page to login template