Add draft for Scala auth module, rewrite tests.