edit token and authentication