Fix error when logged out