update temlates
adding functions for login process