Fix bug passing undefined password with loginWithTempAndSetNewPassword