Fix onApiAuthLoad with Angular routes. Check if accessToken is defined