first version of auto_enrollemnt - should be working anyhow

missing parts are tests ;-)

Also renamed lib.user check_user_password() function to
get_authenticated_user() because it is semantically more correct and matches
the return value of the function.

closes #12736

Change-Id: Ia98a877e18cb52484d28d9c8a8f4b0ce12b233fe
Merge "first version of auto_enrollemnt - should be working anyhow"