I found the following code online. I can get the popup to work, but if the username and password are wrong it doesn't do anything. I would like another box to popup telling you that it is wrong. I really know nothing about JS, so any help would be appreciated.
Code:
<script language="javascript">
function CallScript(){
var username = prompt("Enter Username In the Box Below","")
var password = prompt("Enter Password In the Box Below","")
if (username !="admin" || password !="secret")
{ top.location="about:Bad Username and/or Password" };}
</script>