code review, delete hasAccessToken function