Marcus,
It sounds like you are navigating to the site from inside a framed page in one test and not in the other. Your login page itself did not have frames from what I recall, but if you are on a framed page and click a link to your login page and that A HREF doesn't have a TARGET that pulls it out of the frame you'll be stuck within the frames of the original page.
You may need to some testing to see if you have frames or not. ie test to see type( "oIE.Document.Frames[0]" ) == "O" before you try to use it.
>I've investigated the error and found out that
>the line :
>
>oForm4 = oIE.document.frames[0].document
>
>brings an OLE errorcode: "Dispatch exception code: Access denied"