if (isLoggedIn === true) { db.collection("user-profiles").where("email", "==", email) .get() .then((snapshot) => {