# Logout

The logout is a function in the [users](https://docs.apphive.io/apphive-documentacion/reference/funciones/users) functions which allows to get out from the app to exit his identification and authentication. The user usually use this function to avoid the push notifications or change accounts.

![](https://1781865142-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LvaO9X8rr2FG8JwKkhC-1769347644%2Fuploads%2Fgit-blob-562d5b92431c0be349e63285a8ed79628c185d28%2FCaptura%20de%20Pantalla%202020-02-10%20a%20la\(s\)%2011.08.17.png?alt=media)

### ↗ Callbacks <a href="#entry-vars" id="entry-vars"></a>

* **Error logout:** you can set functions after the user can't log out from the app.
* **Successful logout:** you can set functions after the user log out from the app.

![](https://1781865142-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LvaO9X8rr2FG8JwKkhC-1769347644%2Fuploads%2Fgit-blob-3938596456d999fac027fb8ae3c9bdddbdabcac1%2Fezgif.com-video-to-gif%20\(26\).gif?alt=media)

1. Select a button and add an on press.
2. Activate a [replace screen](https://docs.apphive.io/apphive-documentacion/reference/funciones/navigation/replace-screen) in the successful logout.
3. Select which screen the user will see after he logout.

![](https://1781865142-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LvaO9X8rr2FG8JwKkhC-1769347644%2Fuploads%2Fgit-blob-f2643da6121322a1d011564e0947f14503e47e48%2Fezgif.com-video-to-gif%20\(1\).gif?alt=media)
