From the crust to the core of neutron stars on a microscopic basis