improved auth error detection, and added tests checking how book objects are built