LPS-38243 fix login regression

hey @shuyangzhou, this branch is only meant for regression testing. It would probably not pass peer review for an actual fix.