686 api header authentication

Fixes #686 and moves loading api to api version 2 (where it should have been from the start).