updated logging and first draft for token verify #30
helper for token handling added (with tests) #30