Remove the trailing slash after token on the URL and change the awk to get the token instead of role.