Add auto-pulling middleware and tests.
Merge pull request #2 from kordano/master

Authentication n stuff