Some improvements in template views/ login action