# Auto-login according to OS username

**URL:** <https://forum.inductiveautomation.com/t/auto-login-according-to-os-username/76519>\
**Category:** Ignition\
**Created:** [July 18, 2023, 2:35pm UTC](https://forum.inductiveautomation.com/t/auto-login-according-to-os-username/76519 "2023-07-18T14:35:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ltraverso](https://avatars.discourse-cdn.com/v4/letter/l/e56c9b/32.png) [@ltraverso](https://forum.inductiveautomation.com/u/ltraverso)\
**Post date:** [July 18, 2023, 2:35pm UTC](https://forum.inductiveautomation.com/t/auto-login-according-to-os-username/76519/1 "2023-07-18T14:35:21Z")

</div>

Hello everybody, We have an application running on a production line which we want to auto-login but only certain usernames need to have auto-login. I have a client startup script, look at the username, and if it is not in the approved logs out the user using system.security.logout().  
This worked until version 8.1.17 but now the statement "system.security.logout()" generate "Unexpected exception retrieving UDT definitions during component startup"  
Any suggestion?  
Thank you

---

<div class="post-metadata">

**Author:** ![taohongyu88](https://avatars.discourse-cdn.com/v4/letter/t/f05b48/32.png) [@taohongyu88](https://forum.inductiveautomation.com/u/taohongyu88)\
**Post date:** [July 3, 2025, 6:51am UTC](https://forum.inductiveautomation.com/t/auto-login-according-to-os-username/76519/2 "2025-07-03T06:51:15Z")

</div>

I have the same problem.  
Is it resolved?

Vision Client Start Up Script  
`system.security.logout()`

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/a/fa5663b2f7e517ef6796373fa43967e7ad54e2d7.png)

```python
IllegalStateException

Ignition v8.1.24 (b2023011208)
Java: Azul Systems, Inc. 11.0.16.1

```
