issue #20503: Fix a few problems with login