Add generic authenticate method