Thorny path ahead for Afghan president after election win