fix for Login race condition