Atoms might be matter, truth. But matter is energy, a kind of energy, as Einstein told us. And every thing is energy, - I think Jordon explains that very well in some videos, don't remember, - energy vibrates, and memories are a kind of vibration, that exists inside us , - spirtual . Any experience you have is recorded, - smells, sounds, every thing, as so, is like you are atteching energy to you with that experiences, and thats why we say that we're receiving light by learning, learning is what we do to the vibrations we receive, is a procece.
Anyways, if you konw about life and death cicle, you will notice that that atoms of people, don't pass directly to other people, but the spirt brings back the vibrations, and that vibrations will join with others to form you, physicly or/and psychological, because the physical world is a manifestation of the spirit it self.
Resuming, you spirit keeps the information, and uses the brain to manifest it as what we call memory. Because both, body and spirit, are energy it can change of form, or expend it manifestation form.