fix relogin and identity lookup