fixed OAuth 2.0 refresh on restore, closes #249