I would add an additional check to see if the default user is already the one logged in. Right now, you are re-logging in the default user if it has been idle for your timeout period. I’m guessing that’s not exactly what you were wanting.
4 Likes