So you started with the need to authenticate, which should be documented in the requirements. You know, the things that are required to happen.
I think you're confusing documentation with specification.
Requirements are specified. They are the goals and the conditions in which they are met. Documentation just means paper trails on how things were designed and are expected to work.
Requirements drive the project. Documentation always lag behind the project.