code: func Login(ctx context.Context, authConfig *types.AuthConfig) (HubUser, error) {
  	lclient, err := getClient()
  	if err != nil {
  		return HubUser{}, err
  	}
  
  	// For licensing we know they must have a valid login session
  	if authConfig.Username == "" {
  		return HubUser{}, fmt.Errorf("you must be logged in to access licenses.  Please use 'docker login' then try again")
  	}
  	token, err := lclient.LoginViaAuth(ctx, authConfig.Username, authConfig.Password)
  	if err != nil {
  		return HubUser{}, err
  	}
  	user, err := lclient.GetHubUserByName(ctx, authConfig.Username)
  	if err != nil {
  		return HubUser{}, err
  	}
  	orgs, err := lclient.GetHubUserOrgs(ctx, token)
  	if err != nil {
  		return HubUser{}, err
  	}
  	return HubUser{
  		Client: lclient,
  		token:  token,
  		User:   *user,
  		Orgs:   orgs,
  	}, nil
  
  }
docs: // Login to the license server and return a client that can be used to look up and download license files or generate new trial licenses