Interfacing with the brain for therapy