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

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

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