> 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: login(email: string, password: string, options: LoginOptions) # Method package: wixMembersV2 # Method menu location: wixMembersV2 --> authentication --> login # Method Link: https://dev.wix.com/docs/velo/apis/wix-members-v2/authentication/login.md # Method Description: Logs in a registered member with an email and password. The `login()` function only works with existing members. To register a new member use the [`register()`](#register) function. To complete the login, the returned session token must be applied using the `applySessionToken()` function in the wix-members-frontend API. # Method Code Examples: *** Note: do not assume any prop names or enum values other than the ones in the example. ## login example for dashboard page code ```javascript import { authentication } from 'wix-members.v2'; async function login(email, password, options) { try { const result = await authentication.login(email, password, options); return result; } catch (error) { console.error(error); // Handle the error } } ``` ## login example for exporting from backend code ```javascript import { authentication } from 'wix-members.v2'; import { webMethod, Permissions } from 'wix-web-module'; import { elevate } from 'wix-auth'; const elevatedLogin = elevate(authentication.login); export const login = webMethod( Permissions.Anyone, async (email, password, options) => { try { const result = await elevatedLogin(email, password, options); return result; } catch (error) { console.error(error); // Handle the error } } ); ``` ---