initial commit for mocha tests - needs mock auth and a few fixes