Debugging authentication for python 3