Proper edit token validation

Change-Id: I295ce4d155384ddb68a4b61d4c830d905366efbd