implemented auth API