add id for oauth2
clean tail