Fixing login errors