title: Create session variable in jquery mobile
body: <p>I want to create a session variable on my jquery mobile page for authentication.</p>
  
  <p>i have a login page.</p>
  
  <p>when user login to a session should be created.</p>
  
  <pre><code>$("#submit").click(function (e) {
  
   session('name')=$('#name').val();
  
  });
  </code></pre>
  
  <p>and check that if session variable exist in each page.</p>
  
  <pre><code>$( document ).on( "pageinit", "#homePage", function( event ) {
  if(!session('name'))
  {
  $.mobile.changePage("#loginPage");
  }
  </code></pre>
  
  <p>When sign out button clicked it must remove.</p>
  
  <p>Is it possible? pls help</p>