     }
     
     @IBAction func singIn(sender: UIButton) {
-        sender.enabled = true
-        view.alpha = 0.5
-        activityIndicator.startAnimating()
-        activityIndicator.hidden = false
+
         if !isConnectedToNetwork() {
-            view.alpha = 1.0
             sender.enabled = false
-            activityIndicator.hidden = true
-            activityIndicator.stopAnimating()
             showAlert(.connectivity)
         }else{
             if emailText.text! != "" && passwordText.text! != "" {

    
    override func viewDidDisappear(animated: Bool) {
        super.viewDidDisappear(animated)
        view.alpha = 1.0
        activityIndicator.hidden = true
    }

    var sharedContext: NSManagedObjectContext {

    @IBOutlet weak var emailText: UITextField!
    @IBOutlet weak var passwordText: UITextField!
    

    @IBOutlet weak var singInstackView: UIStackView!
    
    override func viewDidLoad() {
        super.viewDidLoad()

        let backgroundImage = UIImageView(frame: UIScreen.mainScreen().bounds)
        backgroundImage.image = UIImage(named: "background")
        view.insertSubview(backgroundImage, atIndex: 0)
