controling authentication using jquery mobile

controling authentication using jquery mobile

Hi. I'm new on hybrid apps. I try to develop a hybrid app using jquery mobile. I try to make a login form and post it. I think that post username and password using ajax. How i can keep logged-in user data on my application. And how i can control a page is shown or not  to user by his authenticate state. I hope, i can explain my issue.
Can anyone give me an idea?
Thanks in advance.