Adding authentication documentation and examples

Closes #377