I just looked this over a bit since I'm at work and was a little bored.
Try removing line 119.
<form id="form1" name="form1" method="post" action="">
This line isn't needed as your actual login form is below that. This one is not allowing the other to run I believe. Try that out and let me know if it works.