There are some bugs in Apple's official code. I patched them and put on my Github: https://github.com/skycocker/NameAndPassword
This version of the plugin should work fine, as long as you replace
<string>loginwindow:login</string>
line in authorization policy database with
<string>NameAndPassword:invoke</string>
Otherwise it won't log you in.