Add generate_token function
Add docstring
A little pep8 fix
Merge pull request #23 from sloria/generate-token

Add generate_token function