Hi, i have just started on your tutorials. thanks for the information and it being so well structured. i have the following question on login
here is my js code
/* Moralis init code */
const serverUrl = "https://h0yyn4fcuwhw.usemoralis.com:2053/server";
const appId = "SZKm6EvyPd4474XyYRHJjW24WPuld35rlasRfWi6";
Moralis.start({ serverUrl, appId });
/* Authentication code */
async function login() {
let user = Moralis.User.current();
if (!user) {
user = await Moralis.authenticate({ signingMessage: "Log in using Moralis" })
.then(function (user) {
console.log("logged in user:", user);
console.log(user.get("ethAddress"));
})
.catch(function (error) {
console.log(error);
});
}
}
async function logOut() {
await Moralis.User.logOut();
console.log("logged out");
}
document.getElementById("btn-login").onclick = login;
document.getElementById("btn-logout").onclick = logOut;
and i used it in this html
<!DOCTYPE html>
<html>
<head>
<title>Vanilla Boilerplate</title>
<script src="https://unpkg.com/moralis/dist/moralis.js"></script>
</head>
<body>
<h1>Moralis Hello World!</h1>
<button id="btn-login">Moralis Metamask Login</button>
<button id="btn-logout">Logout</button>
<script type="text/javascript" src="./main.js"></script>
</body>
</html>
i have changed many server configurations - testnet, mainnet. any idea why this does not work?