applyAuthentication