Is there a way to automatically login if SSO authentication fails?

I'm using v8.1.24 and I have SSO login working. I'd like to be able to automatically log a default user in if SSO authentication fails. The only thing I can think of is to put something in the client startup script, but it appears that that script only executes after the user logs in. To test I put the following code in the client startup script:

un =
print "\r\n\r\nThis is the username: {}\r\n\r\n".format(un)

When I login on a machine where SSO didn't work, when I open the console, I see the username of the user I manually entered. Obviously I'm going to need something that executes before that. Any ideas?