title: How to implement a first-time-only login scheme for a mobile web application implemented with jQuery Mobile, PhoneGap, and Django?
body: <p>I'm in early (pre-coding) stages of developing a mobile web application using <a href="http://en.wikipedia.org/wiki/JQuery_Mobile" rel="noreferrer">jQuery Mobile</a> (we looked at <a href="http://en.wikipedia.org/wiki/Sencha_Touch" rel="noreferrer">Sencha Touch</a> for a few weeks, but jQuery Mobile is a better fit for our team's competencies). I am wrapping the jQuery Mobile web application with <a href="http://en.wikipedia.org/wiki/PhoneGap" rel="noreferrer">PhoneGap</a> to create an iPhone, iPod touch, and iPad native-ish application. I use Django for our web applications so intend to do the same here for the server-side, with some sort of JSON/Ajax/REST data flow for the interface between the mobile application and the server. Since it's a mobile-only application, we should have access to all the <a href="http://en.wikipedia.org/wiki/HTML5" rel="noreferrer">HTML5</a> kind of stuff. </p>
  
  <p>While I am likely to come up with other issues/questions for this implementation, here is my current question/issue:</p>
  
  <p>I need to set up the application so that the first time the user opens the application, they must enter a username and password to authenticate. Subsequently the user should not have to authenticate unless the user clicks a "settings" link which gives them a page to authenticate with a different account or password. The application should still authenticate to the server each time it is started, using the current username and password that was originally entered, to make sure that the account hasn't been disabled or the password changed or something.</p>
  
  <p>I am pretty new to authentication schemes. What should I do?</p>