         
         navigationController?.navigationBar.topItem?.setRightBarButtonItem(logoutBarButtonItem, animated: false)
         navigationController?.navigationBar.topItem?.title = title
+        
+        updateContentsFromServerUseInitiateRequest(0)
     }
     
     override func viewDidAppear(animated: Bool) {
         super.viewDidAppear(animated)
-        updateContentsFromServerUseInitiateRequest(0)
     }
     
     func tableView(tableView: UITableView, willDisplayCell cell: UITableViewCell, forRowAtIndexPath indexPath: NSIndexPath) {

        
        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) {

            }

            }, failure: { (error: NSError!) -> Void in
                UIAlertView(title: "Oppdatering", message: "Kunne ikke oppdatere innehold", delegate: self, cancelButtonTitle: "OK").show()
                
                if let actualRefreshControl = self.refreshControl {
                    self.refreshControl?.endRefreshing()
                }
                /*if let response = error.userInfo?[AFNetworkingOperationFailingURLRequestErrorKey] as? NSHTTPURLResponse {
                    if response.isKindOfClass(NSHTTPURLResponse) {
                        if (POSAPIManager.sharedManager().responseCodeIsUnauthorized(response)) {
