adds authentication optimization