 
     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 = self.initRequest("POST", url: NSURL(string: "\(baseURL)/api-token-auth/")!, params: params)
-        var session = NSURLSession.sharedSession()
-
+
+        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

    }

    func getClientAppointments(id: Int) {
        var request = self.initRequest("GET", url: NSURL(string: "\(baseURL)/appointments/?client=\(id)&ordering=time")!, params: nil)
        var session = NSURLSession.sharedSession()
    
        var task = session.dataTaskWithRequest(request, completionHandler: {data, response, error -> Void in
            if self.isRequestValid(response) {
                var newData : NSDictionary = NSJSONSerialization.JSONObjectWithData(data, options: .MutableContainers, error: nil) as NSDictionary

    }

    func getClientAppointmentsPerDay(id: Int, date: NSString) {
        var request = NSMutableURLRequest(URL: NSURL(string: "\(baseURL)/appointments/?day=\(date)&client=\(id)&ordering=time")!)
        request.HTTPMethod = "GET"
        request.addValue("application/json", forHTTPHeaderField: "Content-Type")
        request.addValue("application/json", forHTTPHeaderField: "Accept")
        
        var session = NSURLSession.sharedSession()
        var task = session.dataTaskWithRequest(request, completionHandler: {data, response, error -> Void in
            if self.isRequestValid(response) {
                var newData : NSDictionary = NSJSONSerialization.JSONObjectWithData(data, options: .MutableContainers, error: nil) as NSDictionary
