Script Category : JavaScript Script Sub Category : User Authentication If you want to 'protect' a site and don't have CGI access, you can try this JavaScript. Visitors get three tries to enter the correct password then they are refused entry. The password of this example is: password.