last commit for phase2, fixes the login popup crashes