Hi all ,
how can I create a login page in the iOS app, which connect to the online server ?
and how can I save the loged in information in the mobile and how can I know that they are online (same as cookies on the web)
Personally, I dislike PhoneGap-like apps. They don't have the same feel to them as a native app. Taps don't register immediately as clicks, scrolling is laggy, they look a little "off" in terms of design, hardware buttons don't always work like the user expects them to, and so on. This is the lazy way to develop apps but it does allow you to rapidly develop one application that works on all devices.
If you want to go fully native, you'll need to make the web requests yourself to login. Save the login information in a configuration object so the user only has to enter in their information one time. Building a RESTful API on your server is a good idea. You make a request to your server through the API from the app and the server returns results in a JSON or XML format. Your app then parses each response and does something with it.
Google uses tokens, not login credentials for all of their APIs. You first login with OAuth through their login token server and get a set of expiring tokens that can be used with their other apps. Those tokens are then used to do other things.