fixing issue with refresh token. Tokens are not refreshed when they are expired and raise 401