[auth] Adding the ability to re-authenticate automatically on token expiry

This fixes #136