Started on a authenticate function