Here are my suggestions:
Keep the username and password separated in your array instead of combining them in a single string. The reason is that if someone enters a username that contains your delimiter (:) then your logic will get screwed up. You can have an array of arrays like this:
var TheUsers = new Array(5)
TheUsers = new Array("username1","password1");
TheUsers = new Array("username2","password2");
TheUsers = new Array("username3","password3");
TheUsers = new Array("username4","password4");
TheUsers = new Array("username5","password5");
You could then access the username like this (this is just to give you an idea of how to access the information above, in case you don't understand it):
alert(TheUsers); // alerts "username1"
alert(TheUsers); // alerts "username5"
And the passwords:
alert(TheUsers); // alerts "password1"
alert(TheUsers); // alerts "password5"
Next, your loop. If a match is found, there's no need to continue processing the loop. Therefore, once you open the window, you can return and you're done. However, if that never happens, then we can assume that either the username wasn't found, or a username was found but passwords didn't match:
for (i = 0; i < TheUsers.length; i++)
if (TheUsers[i] == username)
// Compare the passwords
if (TheUsers[i] == password)
return; // Stop processing, we're done
// If we're still here, then no match was found
alert("Incorrect Username or Password");
Hope that helps.