Refactor auth.sls