Is there any way of authenticating a homepage using JavaScript? I do know a couple of ways but they are extremly easy to “hack” because the username and passwords are stored in the script itself – as arrays.
Do you guys know any good ways of authenticating just a single subpage or two?
No, there is absolutely no way to authenticate a user using pure JavaScript.
JavaScript is executed on the client side, and thus entirely and easily manipulable.
Authentication always needs to be done on server side. JavaScript can be used to send the credentials to the server, but never to check those credentials.