fixed login timing issue