NoneType object is not subscriptable for refreshtoken