Create function to check if access token is present