saving token to the DB