> For the complete documentation index, see [llms.txt](https://doc.orbeon.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.orbeon.com/form-runner/access-control/login-logout.md).

# Login & Logout

\[SINCE Orbeon Forms 2018.2]

## Menu

Form Runner can show a *user menu* in the navigation bar, allowing users to login, logout, and, if necessary, register. You can enable the user menu by setting the following property to `true` (its default value is `false`):

```xml
<property
    as="xs:boolean"
    name="oxf.fr.authentication.user-menu.enable"
    value="true"/>
```

When enabled, before users login, the menu contain 2 entries: "Login" and "Register", as shown in the screenshot below.

![User menu when logged out](/files/-LTTf1CSWK0bF_hEaRxc)

Conversely, when users are logged in, the menu will show who the user is, as well as provide a way for users to logout.

![User menu when logged in](/files/-LTTf1CV0Ti-Bes23dHh)

You can configure what page users will be taken to when they select "Login", "Logout", or "Register" by setting the properties below, shown here with their default value. Setting a property to the empty string disables hides the corresponding entry in the menu.

```xml
<property
    as="xs:string"
    name="oxf.fr.authentication.user-menu.uri.login"
    value="/fr/auth?source={xxf:get-request-path()}"/>
    
<property as="xs:string"
    name="oxf.fr.authentication.user-menu.uri.logout"
    value="/fr/logout"/>
    
<property as="xs:string"  
    name="oxf.fr.authentication.user-menu.uri.register"
    value=""/>
```

*NOTE: Orbeon Forms does not provide an out of the box system to create and manage users. The `register` menu is intended instead to link to your existing user management system.*

## Default login page

Form Runner comes with a simple default login page which can be used with container-based authentication.

![Default login page](/files/-LV4le6-ALiHUZOmFrgI)

## See also

* [Setup users for access control](/form-runner/access-control/users.md) - How to setup Orbeon Forms so that users and roles are provided.
* [Access control for deployed forms](/form-runner/access-control/deployed-forms.md) - How to control access to deployed forms.
* [Form fields](/form-runner/access-control/form-fields.md) - How to control access to specific form fields based on the user user's roles.
* [Access control for editing forms](/form-runner/access-control/editing-forms.md) - How to control access to Form Builder.
  * [Owner and group member permissions](/form-runner/access-control/owner-group.md) - Access based on ownership and groups.
  * [Organization-based permissions](/form-runner/access-control/organization.md) – Access based on organizational structure.
  * [Token-based permissions](/form-runner/access-control/tokens.md) - Token-based permissions
* [Scenarios](/form-runner/access-control/scenarios.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://doc.orbeon.com/form-runner/access-control/login-logout.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
