Added Error handling to enable auth mod.