Normally with an error message like this in asp you would write the error out the the page itself and not use a pop up message box....
If you really want to use a popup message box you want to force a javascript function to be called when the page loads...
You can do this by adding a page onload event to the body element of your webpage and have a javascript function which uses alert to pop up a message...
eg
Code:
<html>
<head>
<script language="javascript">
function showMessage(){
alert("Your login failed");
}
</script>
<head>
<body onload="showMessage();">
... your page in here ...
</body>
</html>
in your asp you will have to determine if the login failed then write the onload section if it is needed.