Make IAuth protocol work again and add a bit of debugging to it.