Retry the script page request to get the token

If Jenkins requires a login, then the request that is searched for the CSRF token will not contain it. In that case just request the script console page again so the token can be retrieved.