Login example for phonegap app