fix login persistence issue