basic structure of authenticate