I had a very similar problem when I first got my computer. At times it would almost log me off!!
For me it was a bios update that fixed it. The documentation for the bios update even mentioned a fix for erratic mouse behaviour...
So you might see if there's an update for your bios and if so check for what changes/fixes are in it...
g'luck!
Edit-> But as suggested, trying a different mouse might be an easier and safer test to do first...