Examples and helper code for using oauth and phonegap