Fixing login bugs

Fixing login bugs