Add credential to URL for PhoneGap/Cordova support
Alternative using window.location.hash
Chnaged the hash fragment format
Added insecure option