backport authenticate module
Merge pull request #1464 from jadwigo/release/1.6

backport authenticate module for branch 1.6