Interrogating cortical function with transcranial magnetic stimulation: insights from neurodegenerative disease and stroke