begin authentication architecture and logic