Testing phonegap auth handling