If I understand your above correctly, your question should be how do I post data to a website and get the returned page. I don't see anything that would indicate an authentication screen (such as one brought up by htaccess) is appearing and you need to get around it. If that's the case, this is all you need to do.
Code:
// Create the username and password string.
// username and password are the username and password to login with
NSString *postString = [[NSString alloc] initWithFormat:@"check_username=%@&password=%@", username, password];
// Package the string in an NSData object
NSData *requestData = [NSData dataWithBytes: [postString UTF8String] length: [postString length]];
// Create the URL request
NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL: [NSURL URLWithString:webURL]]; // create the URL request
[request setHTTPMethod: @"POST"]; // you're sending POST data
[request setHTTPBody: requestData]; // apply the post data to be sent
// Call the URL
NSURLResponse *response; // holds the response from the server
NSError *error; // holds any errors
NSData *returnData = [NSURLConnection sendSynchronousRequest: request returningResponse:&response error:&error]; // call the URL
/* If the response from the server is a web page, dataReturned will hold the string of the HTML returned. */
NSString *dataReturned = [[NSString alloc] initWithData:returnData encoding:NSASCIIStringEncoding];
On the last line, I use NSASCIIStringEncoding. The call should use NSUTF8StringEncoding, but I've noticed this fails frequently with many websites. I've never had a failure with NSASCIIStringEncoding.
Check the Apple documentation on NSMutableURLRequest. There are numerous parameters you can set for the web request, such as the timeout, referring URL, and any cookies you may want to send.