Fixing login bug