Fixing Python 2.7/3 issues and autogenerating client secret on new app