Fix authentication error

I fixed a bug in the code. When running the main script some of the imports got missed when the code was run as installed.