login race case fix