         super.viewWillAppear(animated)
         
         let title = NSLocalizedString("Accounts title", comment: "Title for navbar at accounts view")
-        logoutButton.setTitle(NSLocalizedString("log out button title", comment: "Title for log out button"), forState: .Normal)
-        logoutButton.setTitleColor(UIColor.digipostLogoutButtonTextColor(), forState: .Normal)
+        
+        logoutButtonVariable?.setTitle(NSLocalizedString("log out button title", comment: "Title for log out button"), forState: .Normal)
+        logoutButtonVariable?.setTitleColor(UIColor.digipostLogoutButtonTextColor(), forState: .Normal)
         
         if let showingItem: UINavigationItem = navigationController?.navigationBar.backItem {
             

        super.viewDidLoad()
        
        logoutBarButtonVariable = logoutBarButtonItem
        
        if let firstVC: UIViewController = navigationController?.viewControllers[0] as? UIViewController {
            if firstVC.navigationItem.rightBarButtonItem == nil {

    @IBOutlet weak var logoutBarButtonItem: UIBarButtonItem!
    
    var logoutBarButtonVariable: UIBarButtonItem?
    var logoutButtonVariable: UIButton?
    var refreshControl: UIRefreshControl?
    var dataSource: AccountTableViewDataSource?
    
