Added function login
Added template for login action