added a response interceptor for redirecting to the login state when a response error is encountered