     func applicationWillTerminate(application: UIApplication!) {
         // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
         // Saves changes in the application's managed object context before the application terminates.
-        /*
+        
         var data:CoreDataHelper = CoreDataHelper()
         var backgrounder:HTTPBackground = HTTPBackground()
         self.completionHandler = {}

                    data.setUserStatus("0")
                }
                else{
                    /*
                    self.outOfBoundsCount++
                    if outOfBoundsCount > 20 {
                        if isIn {
                            isIn = false
                            let data: CoreDataHelper = CoreDataHelper()
                            let state: String = data.getUserStatus()
                            if state == "1" {
                                message = "sending new state"
                                
                                //self.setUserState("0")
                            }
                        }
                        self.outOfBoundsCount = 0
                    }
                    */
                }
            }
            NSLog("%@", message)

        println("username: \(data.getUsername())")
        
        
        sendLocalNotificationWithMessage("You've quit RevCheckIn, \(data.getUsername()). this makes your account inactive!")
        println("SENDING TERMINATION STATE")
        data.setUserStatus("-1")
        
        self.saveContext()
    }

