Client Event Script - Timer, Switch User Question

I have a simple script to switch users to a default username and password after a set amount of time.
See script below.

This is working great with one exception. If the client stays inactive the script keeps firing and firing…
How can I write this so it will only be active if the default user (In this case brewers) is Not logged in?

Just read the client tag for username and check for it?

I’m a complete rookie at this.
One of my attempts was to do just that but my syntax must have been way off.
Would you please show me an example.
Thank you

username = "brewers"
if system.util.getInactivitySeconds() > 30 and"[System]Client/User/Username").value<>"brewers":,password)

Oh Yeah, I was way off.
This is working perfectly.
Thank you