In MSN go into the tools menu - options - then Preferences tab - uncheck the "Run this program when windows starts" tab - uncheck "Allow this program to run in the backgroud"
With the Yahoo IM, open it and click Login and on the pulldown menu it will say preferences. Go into that and click the General tab. Right at the top there should be a box that says login when I startup . Just make sure that box isn't checked. Then click apply.