I know this doesn't exactly answer the question - but I would suggest you rewrite your loginQueryFromServer: method to accept a completion block itself so that it is asynchronous (I think this is ultimately what you are trying to do):
+ (void) loginQueryFromServer:(NSDictionary *)parameters completion:(void(^)(BOOL response, NSError *error))completionBlock {
AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager];
AFHTTPRequestOperation *operation = [manager POST:@"http://domainname/login/" parameters:parameters success:^(AFHTTPRequestOperation *operation, id responseObject) {
completionBlock(YES, nil);
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
completionBlock(NO, error);
}];
[operation start];
}
Use it like this:
[YourClass loginQueryFromServer:someDictionary completion:^(BOOL response, NSError *error) {
// do something with the response and the error if it exists
}];