Fixing problems with auth in python 3