# controller\_logoff

Source: https://zotonic.com/docs/1890/controller_logoff

URI: https://zotonic.com/id/1890

Language: en



Controller that logs off a user, destroying the session. It also removes any “remember me” cookies the user has, so that auto-logon is disabled.

The optional `p` query argument selects the page to visit after logging out and defaults to `/`. Only same-site URLs are accepted; external values are replaced with `/` before the redirect is made.

```django
<a href="{% url logoff p=m.rsc.page_home.page_url %}">Log out</a>
```

The response is not cached or indexed. Logging out resets authentication-token cookies before ending the current authenticated session.

License: 

Attribution: 

Related resources: https://zotonic.com/api/agent/related/1890?language=en


## API access

- [API help](<https://zotonic.com/api-help>)
- [OpenAPI specification](<https://zotonic.com/openapi.json>)
- [This resource as JSON](<https://zotonic.com/api/agent/resource/1890?language=en>)
