bug fix for sso auth and architecture change