Resolves more login bugs
Resolves issue #1230