Fix login persistence issue