Api authorisation

Closes #63 
Ah, oops, I thought I had changed all of these. I'l fix them up.