How to prevent notifications of old Messages when I log into my Mac? I use Messages on my Mac as well as my iPhone.  

Whenever I log into my Mac, notifications pop up for each Message I've received since the last time I logged in, even though I've already checked them on my iPhone.

How can I prevent this?

I like having new message notifications appear, but it's annoying to see the whole day's message history every time I log in..!
Power Nap, a feature of MacBooks that enables them to do more when they are asleep (like back up to iCloud/Time Capsule, check emails, and check iMessage) will allow your Mac to stop showing messages you've already read when you open your computer.  Here is Apple's support guide on turning on Power Nap.