Using templating for login