Fix error cache flush on logout