Adding authenticate method