is this posting to the same page? if so, at the very least put the action in the form tag to point to the page, either statically or with $_SERVER['PHP_SELF'];
also, your variables are wrong, this:
if (isset($POST_HTTP_VARS['login']))
isn't used anymore, and if it was, it is still wrong, it USED to be HTTP_POST_VARS, so, instead of what you have, use:
if (isset($_POST['login']) && $_POST['login'] == "Log in")