With that, we can already check if a password is correct.

Nice! This is basically is how websites check passwords.

Make sure that you create loggedIn with var and store the result of the password check in it.