only calculate unread count when logged in