Implement authenticate method