Preserve backwards compability for loginWithPassword and loginWithToken