Ubuntu provides a really great, simple way to get around this problem.
Click the Power Button up in the right hand corner:
You will see this screen, which you should be familiar with by now:
If you click the Switch User button, you can allow the other person to login to the computer, do whatever they want, and your programs will all keep running right where they left off.
Once the other user is done, just have them log out and you will be returned to your desktop session. You will most likely be prompted for your password.
This is a really great feature. You can even keep both sessions running by just using the Switch User button to switch between the different desktop accounts.