                 }
                 else
                 {
+                    let alertControllerSimple = UIAlertController(title: "Error", message: "There is a problem with connection", preferredStyle: .Alert)
+                    
+                    
+                    let OKAction = UIAlertAction(title: "OK", style: .Default) { (action) in
+                        // ...
+                    }
+                    alertControllerSimple.addAction(OKAction)
+                    
+                    self.presentViewController(alertControllerSimple, animated: true) {
+                        // ...
+                    }
                     // handle errors!!
                     
                 }

                                if error != nil {
                                    // There was an error logging in to this account
                                    // handle this error better
                                    self.onCreateAccount(self)
                                    
                                } else {
                                    // We are now logged in

                                    self.performSegueWithIdentifier("showGroups", sender: nil)
                                    
                                }        })

    }
    
    
    func showError(errorMessage :String) -> Void {
        let alertControllerSimple = UIAlertController(title: "Error", message: errorMessage, preferredStyle: .Alert)
        
        
        let OKAction = UIAlertAction(title: "OK", style: .Default) { (action) in
            self .hideLoading()
        }
        
        alertControllerSimple.addAction(OKAction)
        
        self.presentViewController(alertControllerSimple, animated: true) {
            // ...
        }
        // handle errors!!

    }
    
