Nice! This is basically is how apps check passwords.
Make sure that you create loggedIn with var and store the result of the password check in it.
loggedIn
var