refreshToken() should be treated as defer - in error function of http.request is treated as $http.
refreshToken() should be treated as defer - in error function of http.request is treated as $http.