> For the complete documentation index, see [llms.txt](https://devdocs.brightpay.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://devdocs.brightpay.com/integrating-timesheet-applications/login-management.md).

# Login Management

Users may have more than one BrightID (e.g. have multiple usernames, emails & passwords). For example, a user may work for a bureau and complete payroll for multiple customers. Therefore, they may end up moving Timesheet data into BrightPay for more than one customer (under different Bright IDs). Or a user may complete the accounts for one customer and payroll for a different customer.

The Bright Identity Provider may automatically log the user in, meaning it can be difficult for the user to know which account they are logged in as and also how to change accounts. This is an area of frustration for users using OAuth 2.0 integrations with any application, as it can be difficult for them to resolve themselves.

### Initial Login

If your application does not already have an Access Token (that is not expired) then provide a Login button as shown below (please see [Creating the Initial Login Url](/authentication/retrieving-a-refresh-and-access-token.md#creating-the-initial-login-uri))

<figure><img src="/files/UUfihdwdkmNq68FC9pI4" alt=""><figcaption></figcaption></figure>

On completion of the login process capture the Access Token

### Letting the User see who is logged in

Get the user connected to the Access Token and display it on the screen (please see [Get User Summary](/available-apis/payroll-api-v1.0-methods.md#get-current-user-summary)) then also provide a "Switch User" button in case the wrong account has been logged in (please see [Switching Users](/authentication/switching-users.md))

<figure><img src="/files/vVHaDPvZlpda7hpOPlNj" alt=""><figcaption></figcaption></figure>


---

# 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:

```
GET https://devdocs.brightpay.com/integrating-timesheet-applications/login-management.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
