I am quite confused about sending the login details to webserver.I have partly completed the process howvever am not able to proceed forward , since I am not able to understand the complete process.

This is what i have done.

```
- (IBAction)loginUser:(id)sender {
NSString *userName = self.userNameTextField.text;
NSString *password = self.passwordTextField.text;

NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:@"http://192.168.1.16:8080/WebServices/Authentication.php"]];

[request setHTTPMethod:@"POST"];

NSMutableDictionary *dictionary = [NSMutableDictionary dictionary];
[dictionary setObject:userName forKey:@"pseudo"];
[dictionary setObject:password forKey:@"pass"];

NSData *data = [dictionary copy];

[request setHTTPBody:data];

NSURLConnection *connection = [[NSURLConnection alloc] initWithRequest:request delegate:self];
if(!connection){
    NSLog(@"Connection Failed");

}

}

```

And when I try to run the app after putting the login details , my app crashes ...saying.

```
   2013-12-27 20:00:00.177 Authentication[6820:380f] -[__NSDictionaryI length]: unrecognized selector sent to instance 0x8c265e0
  (lldb) 

```