How the brain builds a sense of self