Fixed username login and wrote login template to block.