JavaScript: Login/Register with localStorage
you have 2 issues: 1. "name" is a reserved word, it's gonna act goffy on you, change it to something else like name1 or nm or something. 2. don't use !==, != will do, you logic is faulty anyways, change it to this:
if(userName.value == storedName && userPw.value == storedPw) {
alert('You are loged in.');
}else {
alert('ERROR.');
}
But yeah, I know you are just practicing, but don't actually save usernames and passwords on the client side.