> For the complete documentation index, see [llms.txt](https://docs.paypangea.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.paypangea.com/login-with-paypangea/sdk-integration/handling-logins.md).

# Handling Logins

For handling logins with PayPangea, add a login button and set up an event listener for click events.

```html
<button id="loginbtn" class="buybtn">Login with PayPangea</button>
```

Then, add JavaScript to handle the button click and invoke the showLogin method :

```javascript
var loginBtn = document.getElementById('loginbtn');

loginBtn.addEventListener('click', function() {
    payPangeaWidget.showLogin({});
});
```
