first draft factory authentication