Added general error parsing and automatic token refresh for implemented
operations.