<script>
var userName = prompt("Pleas Enter UserName...")
var user = "admin"
var pass = "myPass" //for sample: 12345
if (userName == user) {
var userPass = prompt("Insert Your Pass...")
userPass == pass ? alert("Welcome!") : userPass === null ? alert("canceled") : alert("Wrong password")
}
userName === null ? alert("canceled") : alert("I don`t know you")
</script>