Handling login request and template