Add support to re-authenticate if credentials expire.