Second movie sounds like Virtual Nightmare. According to my brief research.
That's gotta be the film. It has all the elements OP remembers, including the old man operating the machine at the end.