     
     func createBusinessRequest(email: NSString, name: NSString, phone: NSString, man: NSString, loc: NSString, completion: ((str: String?, error:NSError?)-> Void)?) {
         var params  = ["email":email, "name":name, "phone_number":phone, "manager_name": man, "location":loc] as Dictionary
-        var request = self.initRequest("POST", url: NSURL(string: "\(baseURL)/businesses/")!, params: params)
-        var session = NSURLSession.sharedSession()
-        
+        var request = NSMutableURLRequest(URL: NSURL(string: "\(baseURL)/businesses/")!)
+        request.HTTPMethod = "POST"
+        request.addValue("application/json", forHTTPHeaderField: "Content-Type")
+        request.addValue("application/json", forHTTPHeaderField: "Accept")
+        request.HTTPBody = NSJSONSerialization.dataWithJSONObject(params, options: nil, error: nil)
+        
+        var session = NSURLSession.sharedSession()
         var task = session.dataTaskWithRequest(request, completionHandler: {data, response, error -> Void in
             if self.isRequestValid(response) {
                 var strData = NSString(data: data, encoding: NSUTF8StringEncoding)

    
    func registerRequest(email: NSString, name: NSString, phone: NSString, passwd: NSString, loc: NSString, man: NSString, bus: NSString, bID: Int, user: NSString) {
        var params  = ["email":email, "name":name, "phone_number": phone,"password":passwd] as Dictionary
        var request = self.initRequest("POST", url: NSURL(string: "\(baseURL)/register/")!, params: params)
        var session = NSURLSession.sharedSession()
        
        var task = session.dataTaskWithRequest(request, completionHandler: {data, response, error -> Void in
            if self.isRequestValid(response) {
                self.authRequest(email, name: name, phone: phone, passwd: passwd, loc: loc, man: man, bus: bus, bID: bID, user: user)


    func authRequest(email: NSString, name: NSString, phone: NSString, passwd: NSString, loc: NSString, man: NSString, bus: NSString, bID: Int, user: NSString) {
        var params  = ["email":email,"password":passwd] as Dictionary

        var request = NSMutableURLRequest(URL: NSURL(string: "\(baseURL)/api-token-auth/")!)
        request.HTTPMethod = "POST"
        request.addValue("application/json", forHTTPHeaderField: "Content-Type")
        request.addValue("application/json", forHTTPHeaderField: "Accept")
        request.HTTPBody = NSJSONSerialization.dataWithJSONObject(params, options: nil, error: nil)

        var session = NSURLSession.sharedSession()
        var task = session.dataTaskWithRequest(request, completionHandler: {data, response, error -> Void in
            if self.isRequestValid(response) {
                var json = NSJSONSerialization.JSONObjectWithData(data, options: .MutableLeaves, error: nil) as NSDictionary
