Added partner oauth support and implemented renew token feature