> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # Method name: authentication.loggedIn() # Method Link: https://dev.wix.com/docs/sdk/host-modules/site/authentication/logged-in.md # Method Description: Checks if a member is currently logged in to the site. Use this function to determine the current authentication state and to show or hide content based on login status. # Method Permissions: # Method Permissions Scopes IDs: undefined # Method Code Examples: ## Check if a member is logged in ```javascript ```typescript import { loggedIn } from '@wix/authentication'; if (loggedIn()) { console.log('Member is logged in'); // Show member-only content } else { console.log('No member is logged in'); // Show login prompt } ``` ``` ## Conditionally render UI based on login status ```javascript ```typescript import { loggedIn, login, logout } from '@wix/authentication'; function renderAuthButton() { const button = document.getElementById('authButton'); if (loggedIn()) { button.textContent = 'Logout'; button.onclick = () => logout(); } else { button.textContent = 'Login'; button.onclick = () => { // Show login form }; } } ``` ```