Fixing login timing issues