Moralis.start({ serverUrl, appId });
async function login() {
let user = Moralis.User.current();
if (!user) {
user = await Moralis.authenticate();
}
console.log("logged in user:", user);
}
async function logOut() {
await Moralis.User.logOut();
console.log("logged out");
}
document.getElementById(âbtn-loginâ).onclick = login;
document.getElementById(âbtn-logoutâ).onclick = logOut;