fix bug: sometimes getting userinfo from cookie failed