Added renew auth function, and tests