implement pluggable authentication using classes instead of modules