fixed some bugs for non-login users