Restoring synaptic function to prevent and treat neurodegenerative diseases