Moralis.initialize(âchsq9Snf5cP87ThamdobAZBUhoyWIdFuX5RVsRIPâ);
Moralis.serverURL = "https://bspz2lfp1lyx.bigmoralis.com:2053/server";
let homepage = "http://127.0.0.1:5500/index.html";
if (Moralis.User.current() == null && window.location.href != homepage) {
document.querySelector('body').style.display = 'none';
window.location.href = "index.html";
console.log("Not so fast!");
}
login = async () => {
await Moralis.authenticate().then(async function (user) {
console.log("logged in");
user.set("name", document.getElementById('user-username').value);
user.set("email", document.getElementById('user-email').value);
await user.save();
window.location.href = "Dashboard.html"})}
logout = async () => {
await Moralis.User.logOut();
window.location.href = "index.html"};
if(document.querySelector('#btn-login') != null){
document.querySelector('#btn-login').onclick = login;}
if (document.querySelector('#btn-logout') != null){
document.querySelector('#btn-logout').onclick = logout;}`Preformatted text`