Fix login persistence issues