fix nullpo that is occurred when user not logged in