Solvable... Firstly you can look for #contname and or #contsize, #contid being set to that gumps value. You can then either use orc to read the question and input answer or simpler have the script beep or alert you in someway that you need to enter answer. Or you could do as you say logout and login again perhaps the simplest way.
So the answer is yes.. doable scan the script folders for login script as an example.