         NSOperationQueue.mainQueue().addOperationWithBlock { () -> Void in
                 self.performSegueWithIdentifier("LoginSegue", sender: self)
             }
+        }
+    }
+
+    override func viewWillAppear(animated: Bool) {
+        super.viewWillAppear(animated)
+
+        self.networkHandler.myClass(0, context: context, success: { (result: [AnyObject]!) -> Void in
+            self.currentClasses = result as? [Class]
+            }, failure: { (error: NSError!) -> Void in
+                print(error)
+            }) { () -> Void in
+                self.tableView.reloadData()
         }
     }
 


    @IBOutlet weak var tableView: UITableView!

    var selectedClass: Class?

    lazy var context: NSManagedObjectContext = {
        let delegate: AppDelegate = UIApplication.sharedApplication().delegate as! AppDelegate

        }
    }()

    // MARK: ViewController

    override func viewDidLoad() {
