refactored out connection from userDigest, added test setup with mocha
added log for successful connection for userDigest