                     {
                         self.avatarImageView.image = UIImage(data: data!)
                         self.avatarImageView.alpha = 1.0
+                        self.saveAvatarImage(self.avatarImageView.image!)
                     }
                     
                     dispatch_async(dispatch_get_main_queue(), displayImage)

    @IBOutlet var activityIndicatorView: UIActivityIndicatorView!
    
    lazy var userManager: UserManager = UserManager()
    
    override func viewDidLoad() {
        super.viewDidLoad()

            
            task.resume()
        }
    }
    
    func saveAvatarImage(avatarImage: UIImage){
        fileStorageManager.storeImageFile(avatarImage, path: getAvatarImagePath())
    }
    
    func loadAvatarImageFromStorage(){
        if let loadedImage = fileStorageManager.loadImageFromPath(getAvatarImagePath()) {
            self.avatarImageView.image = loadedImage
        }
    }
    
    func getAvatarImagePath() -> String {
        let avatarImageName = "avatar.png"
        return fileStorageManager.fileInDocumentsDirectory(avatarImageName)
    }
    
    func dismissActivityIndicatorView() {
