move creation of user tokens into db module