# Feature Request: Logout and bring up login screen at same time

**URL:** <https://forum.inductiveautomation.com/t/feature-request-logout-and-bring-up-login-screen-at-same-time/33079>\
**Category:** Ignition Early Access\
**Created:** [March 13, 2020, 7:15pm UTC](https://forum.inductiveautomation.com/t/feature-request-logout-and-bring-up-login-screen-at-same-time/33079 "2020-03-13T19:15:29Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![kyle.demerath](https://avatars.discourse-cdn.com/v4/letter/k/5e9695/32.png) [@kyle.demerath](https://forum.inductiveautomation.com/u/kyle.demerath)\
**Post date:** [March 13, 2020, 7:15pm UTC](https://forum.inductiveautomation.com/t/feature-request-logout-and-bring-up-login-screen-at-same-time/33079/1 "2020-03-13T19:15:29Z")

</div>

Right now to log out of a user and log in a new user you have to do two separate actions as far as I can tell. You need to first press a button to logout - which requires the browser to refresh the screens, then you have to login, which once again requires a refresh that takes time.

It would be great if one button could log out and bring up the login screen at the same time, taking those refreshes from 2 to 1 and reducing button clicks. Even better would be if the full refresh wasn’t necessary, but I assume that is more deeply built in to the user management in Ignition and less likely to change.

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [March 13, 2020, 10:31pm UTC](https://forum.inductiveautomation.com/t/feature-request-logout-and-bring-up-login-screen-at-same-time/33079/2 "2020-03-13T22:31:59Z")

</div>

Why not switch user?

Edit: Example script from switch user form:

```auto
# Pull the username and password from the input components
username = event.source.parent.getComponent("Username").text
password = event.source.parent.getComponent("Password").text

# Call switchUser. The event object is passed to this
# function so that if the username and password work,
# this window will be closed before the switch occurs.
success = system.security.switchUser(username, password, event)

# If the login didn't work, give input focus back to the
# username component, so that the user can try again
if not success:
	event.source.parent.getComponent("Username").requestFocusInWindow()

```

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [March 13, 2020, 10:35pm UTC](https://forum.inductiveautomation.com/t/feature-request-logout-and-bring-up-login-screen-at-same-time/33079/3 "2020-03-13T22:35:56Z")

</div>

@jlandwerlen: You’re using Vision, wile this post is a Perspective request.

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [March 14, 2020, 2:20am UTC](https://forum.inductiveautomation.com/t/feature-request-logout-and-bring-up-login-screen-at-same-time/33079/4 "2020-03-14T02:20:18Z")

</div>

Oops…

---

<div class="post-metadata">

**Author:** ![kyle.demerath](https://avatars.discourse-cdn.com/v4/letter/k/5e9695/32.png) [@kyle.demerath](https://forum.inductiveautomation.com/u/kyle.demerath)\
**Post date:** [August 7, 2020, 2:57pm UTC](https://forum.inductiveautomation.com/t/feature-request-logout-and-bring-up-login-screen-at-same-time/33079/5 "2020-08-07T14:57:09Z")

</div>

@cmallonee - Any chance this feature/ability will come to Perspective as well?

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [August 10, 2020, 6:41pm UTC](https://forum.inductiveautomation.com/t/feature-request-logout-and-bring-up-login-screen-at-same-time/33079/6 "2020-08-10T18:41:16Z")

</div>

I think you can do this by forcing authentication:

```auto
system.perspective.login(forceAuth=True)

```

This requires a user to re-authenticate - even if they are logged in. If they are not logged in, then they are forced to log in (unless they use the browser’s “back” buttons to get into a state before the button was pressed).
