fixing use of id when logged out