# onLogout() function

**URL:** <https://forum.wixstudio.com/t/onlogout-function/16012>\
**Category:** Ask the community\
**Tags:** code\
**Created:** [March 8, 2019, 8:16pm UTC](https://forum.wixstudio.com/t/onlogout-function/16012 "2019-03-08T20:16:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![webmaster-1](https://avatars.discourse-cdn.com/v4/letter/w/58956e/32.png) [@webmaster-1](https://forum.wixstudio.com/u/webmaster-1)\
**Post date:** [March 8, 2019, 8:16pm UTC](https://forum.wixstudio.com/t/onlogout-function/16012/1 "2019-03-08T20:16:03Z")

</div>

I would like an onLogout function that works like the onLogin function  
After a user successfully logs off my site I need to remove some session data and put them back on the Home page.
