thanks Ray
couple of follow up questions on this
1. is replacing $_SERVER["PHP_SELF"] with $_SERVER["REQUEST_URI"] ok?
2. is this ok as <form id="form1" name="form1" method="post" action="users_login.php?failed=1<?php echo(isset($_SERVER["QUERY_STRING"])?"&".($_SERVER["QUERY_STRING"]):""); ?>" class="form-container formLogin">?