U.S. stocks closed higher on Monday as technology stocks recovered from a wobbly performance last week.