I’m curious if you mean the user can’t proceed without logging in?
If that is what you mean, I don’t believe that’s a popup (without seeing the site). I would think that is a modal dialog, which is the common practice. A modal can look just like a popup. But, a popup can be easily closed, whereas a modal can look like a popup, but can’t be closed.
A modal can be created using code.
Also, @Zeroic
I understand what you’re doing with the code, but IMHO it is very insecure because it exposes the password.
Myself, I think I would change it to:
function getUserCredentials() {
let username, password;
do {
username = prompt(“Enter your username (at least 5 characters):”);
} while (!username || username.length < 5);
do {
password = prompt(“Enter your password (at least 8 characters):”);
} while (!password || password.length < 8);
alert(“Credentials received (but NOT securely stored):\n” +
Username: ${username}\nPassword length: ${password.length});
}
getUserCredentials();
this does not expose the password.
Just an observation.
You always have good information and it’s just something I noticed on this code 
2 Likes