Update the submit function to get called on login