I realized the major mistake I made. The chilkat example is for an app running on a computer, hence also the redirect to localhost. Guess the chilkat example send my brain on a goose chase.