move determine_authtype somewhere more general
remove duplication in the authentication code
add support for basic authentication to all APIs
pep8
be more protective about spec compliance
make wrappers required
Merge pull request #4448 from dimagi/basic-auth-apis

make APIs accept basic auth