Fixed slight bug in sso redirection