There are APIs that you can use to find the message window and click on the Stay Offline button, but I don't use APIs that often so someone else will have to tell you which ones to use if you can't find them yourself. (I don't think you can keep IE from doing its thing entirely.)