Refactored auth config