API_KEY and API_SECRET are both global and thread-local
Merge pull request #83 from danielsz/glocals

API_KEY and API_SECRET are both global and thread-local