Go into Settings
Scroll down to the Truphone icon under applications
Select it
Scroll down and set Shake to Lock to ON
Now launch TruPhone
Once you're logged in, shake your phone and it will lock it, so you can lock the phone but stay connected with the app running.