# Creating lock screen/ switch user/ logout button and showing current time

**URL:** <https://forum.inductiveautomation.com/t/creating-lock-screen-switch-user-logout-button-and-showing-current-time/82430>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [November 28, 2023, 4:14pm UTC](https://forum.inductiveautomation.com/t/creating-lock-screen-switch-user-logout-button-and-showing-current-time/82430 "2023-11-28T16:14:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Long\_Tran](https://avatars.discourse-cdn.com/v4/letter/l/8edcca/32.png) [@Long\_Tran](https://forum.inductiveautomation.com/u/Long_Tran)\
**Post date:** [November 28, 2023, 4:14pm UTC](https://forum.inductiveautomation.com/t/creating-lock-screen-switch-user-logout-button-and-showing-current-time/82430/1 "2023-11-28T16:14:53Z")

</div>

Hi,

I just get started on Ignition design and trying to replicate the lock screen/ switch user/ lockout button and showing the current time/ alarms like the image down below. I have seen this a couple times now, is there an already built in template for this or will I need to create every one of them as a button? If so, would I create 3 seperate buttons for the functions and a label that updates every second?  
Thanks  
 ![Capture](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/3/c3897250dc7f23b685c4604d7c69f2172f4f47b5.png)

---

<div class="post-metadata">

**Author:** ![liliana\_Wong](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/liliana_wong/32/44032_2.png) [@liliana\_Wong](https://forum.inductiveautomation.com/u/liliana_Wong)\
**Post date:** [December 13, 2023, 9:41pm UTC](https://forum.inductiveautomation.com/t/creating-lock-screen-switch-user-logout-button-and-showing-current-time/82430/2 "2023-12-13T21:41:36Z")

</div>

Hi,

To implement this, you can create a template and utilize the following functions into a script. You can then add these scripts to either labels or buttons to represent each function.

Vision:  
[https://docs.inductiveautomation.com/display/DOC81/system.security.lockScreen](https://docs.inductiveautomation.com/display/DOC81/system.security.lockScreen)  
[https://docs.inductiveautomation.com/display/DOC81/system.security.switchUser](https://docs.inductiveautomation.com/display/DOC81/system.security.switchUser)  
[https://docs.inductiveautomation.com/display/DOC81/system.security.logout](https://docs.inductiveautomation.com/display/DOC81/system.security.logout)

Perspective:  
Perspective does not have the scope outside the browser to do a lock screen functionality. The workaround for this would be to use the Perspective's log out system function.

Here is the documentation on that system function: [system.perspective.logout - Ignition User Manual 8.1 - Ignition Documentation](https://docs.inductiveautomation.com/display/DOC81/system.perspective.logout)

A workaround for switching a user in perspective would be to call [`system.perspective.logout`](https://docs.inductiveautomation.com/display/DOC80/system.perspective.logout) which will log the current user out. You can then call [`system.perspective.login`](https://docs.inductiveautomation.com/display/DOC80/system.perspective.login) to redirect them to the IdP to login as a new user.
