modified auth. method