added generation of token during setup