prepare authentication