... we're not that far from understanding the nitty gritty details of how neurons interact. Once that is modeled with high enough accuracy we will, to borrow your own words, "know how the brain works". This is not to say that we will be able to do real-time whole brain emulation, just that we will (in fact in most senses of the word we know today) know the basics of how the brain works. This takes away the magic or mystical aspect of consciousness and reduces it an emergent phenomenon from a complex enough system.
This question is key. I believe your assumption, that what we understand as "consciousness" is simply an emergent phenomenon, necessarily follows from the belief that each human being's consciousness derives solely from the computer that is the brain. But therein lies the mystery. I subjectively "know" that I exist, though I cannot prove this to anyone. I seem to possess some "spark of life", yet I cannot prove outside myself that I am anything but a complex machine. Out of all of the lives in this world, how is it that I am experiencing this particular life? It seems so improbable that I would even exist at all. A state of nothingness would seem to be so much more reasonable, and likely.Do you believe that all human subjective experience arises in the brain and nervous system (if you believe something other than that, it's difficult to follow any line of logical argumentation since one would be mixing in magical thought)?
Faced with questions like this, a great many of us turn to the ideas that seem to have the greatest explanatory power. The idea that the Big Bang was meticulously planned by an eternal, transcendent, conscious entity who then bestows a spark of life upon each brain in the created universe is logical even if not necessarily provable. While it strongly appears that in our day to day lives here on Earth, our memories and perceptions do derive entirely, or almost entirely, from measurable activity in our brains, there seems to be something that makes us "alive". In any case, there are enough mysteries in our understanding of reality, including in the realm of physics, that I feel humility is warranted. At this point, as to the emergence of what we seem to be calling consciousness, all we really have is theories.
At any rate, if I cannot prove that I am anything more than a supercomputer, how could anyone prove that an AI is conscious in the same manner as a human? For some time, the question as to whether AIs should have "human rights" may be impossible for everyone to agree on.