fix logged out bug.