Accessing Wix Login Bar in Code

I originally employed the Wix Login Bar on my site andhave been slowly gaining more skills ever sice.

I have 600 odd members to my site so do not wish at thi stage to create my own log in page however

Can I in code if (!loggedIn) {} then automaticallyopen the Login Bar Lightbox (?) window as opposed to saying “Go and log in”

I am assuming I need a line wixWindow . openLightbox (“LightboxName”);

Can anyone point me in the rioght direction