Must set the template var login to success or failed so that the next action can take place