Adding JSON Web Token support

re-submitting to develop branch

adresses #140