Adds automatic authentication check before every API request