Fixes a login issue
(cherry picked from commit b25fa99)