Trying to make this iFrame workaround work correctly

The creators of the wyswyg editor I am using to make a website have disabled functional customization on the system pages. Rather than just dealing with it, and hoping they re-enable that feature in the future, I wanted to make a workaround that would allow me to use part of the login/register page in a module I could put on any page I wish. My solution was to show part of the page in an iFrame, and that part of the idea works just fine. Where I'm stuck is that I need the page that the iframe is nested in to completely reload when the user is done interacting with the module. In context this means that the page refreshes, and the module can't be seen any longer because the user is logged in. Here is the iframe code:

<code><div style="border: 0px solid #FFF; overflow: hidden; margin-left: 300px; margin-top: 30px; margin-bottom: 30px; max-width: 406px; height: 230px; position: relative;">

<form method="POST" action="getForm.php">
<iframe id="login" scrolling="no" src="http://lumina-fc.com/login" style="position: relative; margin-left: -255px; height: 270px; margin-top: -50px; width: 700px;">
</iframe>
</div></code>

After several days of fishing around the internet and struggling to make this work, I found out that I could use javascript to check the current url of the iframe and act based on that. I have what I think might work, but since I'm not a programmer I don't know if it's done remotely right. Here is the code I've come up with:

 <code><script type="text/javascript" language="javascript">
function GetIFrameUrl()
{
  if document.getElementById("login").src="";{
      window.top.reload();}}
</script></code>

Not entirely sure what your trying to do, but assuming that the actual logic is correct this would be the correctly written code:

<code>

<script type="text/javascript" language="javascript">

function GetIFrameUrl(){ 

if (document.getElementById("login").src === ""){     

window.top.reload();

}

}</script>

</code>