Disable Background overlay

Hey Everybody,

I wanted a certain lightbox on my page only popup when the user is not logged in. I tried to hide it when the User is logged in with the following code. It works, but the background overlay is still there and blocks the page. Any suggestions?

Thanks, Bernhard

import wixUsers from ‘wix-users’ ;

$w . onReady ( function () {
hideElem ();
});

wixUsers . onLogin (() => {
hideElem ();
});

function hideElem ( ) {
let user = wixUsers . currentUser ;
let isLoggedIn = user . loggedIn ;
if ( isLoggedIn ) {
$w ( ‘#lightbox1’ ). hide ();

} // API Reference: Introduction - Velo API Reference - Wix.com
// “Hello, World!” Example: Velo Learning Center
}