                 }
             }
         }
+        
+        refreshControl = UIRefreshControl()
+        refreshControl?.tintColor = UIColor.digipostGreyOne()
+        refreshControl?.addTarget(self, action: "refresh", forControlEvents: UIControlEvents.ValueChanged)
+        tableView.addSubview(refreshControl!)
+    }
+    
+    func refresh() {
+        updateContentsFromServerUseInitiateRequest(0)
+        
+        
     }
 
     override func viewWillAppear(animated: Bool) {

    
    var logoutBarButtonVariable: UIBarButtonItem?
    
    var refreshControl: UIRefreshControl? // trengs?
    //var dataSource: POSAccountViewTableViewDataSource?
    var dataSource: AccountTableViewDataSource?
    
    override func viewDidLoad() {
        super.viewDidLoad()
       // self.dataSource = POSAccountViewTableViewDataSource(asDataSourceForTableView: self.tableView)
        
        logoutBarButtonVariable = logoutBarButtonItem


    
    func updateContentsFromServerUseInitiateRequest(userDidInitiateRequest: Int) {
        POSAPIManager.sharedManager().updateRootResourceWithSuccess({ () -> Void in
            if let actualRefreshControl = self.refreshControl {
                self.refreshControl?.endRefreshing()
            }

            }, failure: { (error: NSError!) -> Void in
                                
                /*if let response = error.userInfo?[AFNetworkingOperationFailingURLRequestErrorKey] as? NSHTTPURLResponse {
