Quite a few countries log all visited websites for months to years. Tor devs have been aware of the problem you brought up for quite a while, and have proposed implementing authentication systems to protect from this. No idea the status of this though.