Slightly fix some broken login code