add token field and generate random token