Updates for redirect of SSO to ensure that the correct sequence is followed and no JavaScript errors are occurring.