backport authenticate module for branch 1.6

see https://github.com/bolt/bolt/pull/1463