Refactor the AWSCTL logic to separate the responsibilities of SSO Setup and SSO Init . This will reduce confusion and improve maintainability.