Assessing and restoring cognitive functions early after stroke