Add authentication routine

Not used yet.
Fix compile errors
Auth integrated with existing `transport`
Update test mock
Merge pull request #1 from rampage644/master

Authentication