fix some loginuser bugs