added code to retrieve user token