Modularize a bit more JWT generation. Clean-up the code.
Modularize a bit more JWT generation. Clean-up the code.

jkklapp/endpoints_angular_test,jkklapp/endpoints_angular_test,jkklapp/endpoints_angular_test