I am having a strange UX problem with SO.

The issue happens when I am working on some code of mine, and I look something up in google and end up in SO. When I land on the SO page, the first thing I see is a notification about a new message or reputation change. And invariably I click on it, and that's when my work gets derailed. I usually spend a few minute on SO then, replying or something, and I completely forget why I was there in the first place. So I have to navigate back to my original question to remind myself what it was. It's kind of annoying. I'm here to find answers for my work most of the time, and I get sucked in the social media aspect of the site.

Has anyone the same problem? Any idea to avoid this?