Updated version for reauthorization functionality