Connection singleton + cleaning up the foreman stuff in core
my version
Added Shell auth + credentials tests