sync login state