The current form action is slightly different:
<form action="<?php echo ($_SERVER["PHP_SELF"].(isset($_SERVER["QUERY_STRING"])?"?".htmlentities($_SERVER["QUERY_STRING"]):""));?>" method="post" name="WAATKLogInForm" id="WAATKLogInForm">
The brackets don't balance in your sample. Could you just revise this code to what it should be? Much appreciated.
Regards.