using token to access the resource for user login