Add authentication
Merge pull request #11 from hlecorche/authentication

Add authentication
Fix minor coding style inconsistency.
Tweak comment.
Add authentication examples.