Without a little more information, and perhaps some code fragments, it's difficult to tell what you are even trying to accomplish. For example:
The login page is in between two frames.
makes no sense to me. Do you mean between iframes? If not, then having something between frames in a frameset makes no sense.
So what are you trying to do in the first place?