Add ensureAuthenticated() on each api request