Replace auth code with Auth module