You can do all of that without leaving Studio Pro.
Or, the old thread solution with a Java action will still work too. I’d recommend:
Take a look at this below link for logout in java action
Hope this is what you are looking for.