This work provides a foundation for a more pluggable authentication system such as the one outlined in #1317. closes #1317