Add caching for credentials

Results in ~100% speed boost, from 16k/sec to 32k/sec on my MacBook Air.
0.2.0