[login] save and restore login states over restarts