backport authenticate module