Fix compile errors
Fix building token header entry
Auth if sending for the firsst time
Fix dangerous buffer write
Merge pull request #3 from rampage644/master

Fixes, auth on first time