Fix crash on login