Function hasAccessToken is now public