Fixing login
Reduced code