On iPhone, how do I show a login screen to get username and password before giving access to iPhone app that accesses secure website?
On iPhone, how do I show a login screen to get username and password before giving access to iPhone app?  Also, does the iPhone store a cookie to the secure website like a web browser?

I was thinking of giving users to my website a long API key to store in the settings of their iPhone instead of asking them to login with a username/password (seems to be the Slicehost iPhone app approach.)  Which is the best way to get a user to login securely?  I have full control over the design of the iPhone app and website so have a lot of flexibility.
On iPhone, how do I show a login screen to get username and password before giving access to iPhone app that accesses secure website?
===

On iPhone, how do I show a login screen to get username and password before giving access to iPhone app?  Also, does the iPhone store a cookie to the secure website like a web browser?

I was thinking of giving users to my website a long API key to store in the settings of their iPhone instead of asking them to login with a username/password (seems to be the Slicehost iPhone app approach.)  Which is the best way to get a user to login securely?  I have full control over the design of the iPhone app and website so have a lot of flexibility.