         FirebaseClient.sharedInstance().attemptFacebookLogin(self) { (success, result, error) in
             
             if error != nil {
-                performUpdatesOnMain({ 
+                performUpdatesOnMain({
+                    self.setUIEnabled(true)
                     self.sendAlert(error!)
                 })
             } else if success {

            FirebaseClient.sharedInstance().createUser(email, password: password, completionHandler: { (success, error) in
                
                if error != nil {
                    performUpdatesOnMain({ 
                        self.sendAlert(error!)
                        self.setUIEnabled(true)
                    })
                } else {
                    performUpdatesOnMain({ 

            UdacityCient.sharedInstance().authenticateUser(email, password: password, completionHandlerForLogin: { (success, error) in
                
                if error != nil {
                    performUpdatesOnMain({
                        self.setUIEnabled(true)
                        self.sendAlert(error!)
                    })
                } else {
