massive refactor of authentication service; it installs now and is organized correctly