I'm sorry to be a bit pedantic but you also have some other issues in your code:
1) You include a great deal of html and javascript straight into your php code, making it much more difficult to read, a big problem if you (or others) decide to work upon it. Even if your script is small, it's always good practise to seperate the html and the php code.
2) Use Comments - This will allow you to provide a way for developers to gain a grasp of the function of your code without having to read it through. They might also help you spot logic errors such as the use of two mysql queries when you only need one.
3) Use single quotes for strings if they contain many double quotes. For example:
echo "You are already logged in. If you logged in as the incorrect user, please <a href=\"logout\" title=\"Logout Of Site\">logout</a> first and then log back in as the correct user.<br>If you are having log in problems, please email your issue to <a href=\"mailto:login@site.com\" title=\"Email login@site.com for problems that you are having with logging in.\">login@avpshowcase.com</a>";
Would it not have been easier to use this:
echo 'You are already logged in. If you logged in as the incorrect user, please <a href="logout" title="Logout Of Site">logout</a> first and then log back in as the correct user.<br>If you are having log in problems, please email your issue to <a href="mailto:login@site.com" title="Email login@site.com for problems that you are having with logging in.">login@avpshowcase.com</a>';
And this is nothing compared to the form, full of hundreds of unneccessary escaped double quotes. I tend to use single quotes for my strings in php so that I don't have to escape double quotes if I have html code in the string.
Other than this (and the adjustments from bradgrafelman) your code seems ok and I'm glad you indented your code ๐