sample code + auth token handling