Added token creation and handling, beginnings of authentication