Is User Logged In

// Initialize provider
import Fortmatic from 'fortmatic';
import Web3 from 'web3';
const fm = new Fortmatic('YOUR_API_KEY');
window.web3 = new Web3(fm.getProvider());
let isUserLoggedIn = await fm.user.isLoggedIn();
console.log(isUserLoggedIn); // false
fm.user.login().then(() => {
isUserLoggedIn = await fm.user.isLoggedIn();
console.log(isUserLoggedIn); // true
});