# Prevent Auto-Logout

**URL:** <https://forum.inductiveautomation.com/t/prevent-auto-logout/9269>\
**Category:** Ignition\
**Created:** [October 31, 2014, 8:20pm UTC](https://forum.inductiveautomation.com/t/prevent-auto-logout/9269 "2014-10-31T20:20:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jlteel](https://avatars.discourse-cdn.com/v4/letter/j/c67d28/32.png) [@jlteel](https://forum.inductiveautomation.com/u/jlteel)\
**Post date:** [October 31, 2014, 8:20pm UTC](https://forum.inductiveautomation.com/t/prevent-auto-logout/9269/1 "2014-10-31T20:20:17Z")

</div>

Is there a way to prevent a client from automatically logging out after 5 minutes? Instead I’d rather have some sort of default, read-only user log in automatically.

Thanks.

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [October 31, 2014, 11:15pm UTC](https://forum.inductiveautomation.com/t/prevent-auto-logout/9269/2 "2014-10-31T23:15:19Z")

</div>

Take a look in your client timer scripts. There’s one there that monitors inactivity. You can set the time to whatever you wish, or disable the script completely. I reworked one to go back to a default user if one with elevated privileges logged in.

Hope this helps!

---

<div class="post-metadata">

**Author:** ![Paul.Scott](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul.scott/32/4578_2.png) [@Paul.Scott](https://forum.inductiveautomation.com/u/Paul.Scott)\
**Post date:** [October 31, 2014, 11:30pm UTC](https://forum.inductiveautomation.com/t/prevent-auto-logout/9269/3 "2014-10-31T23:30:40Z")

</div>

JordanCClark is spot on. You would want to alter the timer script to use system.security.switchUser to change the currently logged in to the read-only user you created instead of calling system.security.logout

---

<div class="post-metadata">

**Author:** ![jlteel](https://avatars.discourse-cdn.com/v4/letter/j/c67d28/32.png) [@jlteel](https://forum.inductiveautomation.com/u/jlteel)\
**Post date:** [November 3, 2014, 4:26pm UTC](https://forum.inductiveautomation.com/t/prevent-auto-logout/9269/4 "2014-11-03T16:26:22Z")

</div>

Thanks, as always. I never would have thought to look there for this functionality.
