// POST: api/User?username=elad
        private void ConfirmButton_Click(object sender, RoutedEventArgs e)
        {
            var controller = "User?username="******"&token=" + _user.token;
            var data       = "{\"Username\":\"" + Crypto.Encrypt(UsernameTxt.Text) + "\"," +
                             "\"Password\":\"" + Crypto.Encrypt(PasswordTxt.Text) + "\","
                             + "\"AvatarPath\":\"" + Picture + "\"," +
                             "\"Email\":\"" + Crypto.Encrypt(EmailTxt.Text) + "\"}";

            try
            {
                var ans     = RestClient.MakePostRequest(controller, data);
                var json    = JObject.Parse(ans);
                var tmpUser = json.ToObject <UserData>();
                if (tmpUser.Message == null)
                {
                    _user.Username   = Crypto.Decrypt(tmpUser.Username);
                    _user.Password   = Crypto.Decrypt(tmpUser.Password);
                    _user.Email      = Crypto.Decrypt(tmpUser.Email);
                    _user.AvatarPath = tmpUser.AvatarPath;
                    _mainWindow.UpdateAvatar(tmpUser.AvatarPath);
                    Close();
                }
                else
                {
                    MessageBox.Show(tmpUser.Message, "Error in edit profile", MessageBoxButton.OK, MessageBoxImage.Error);
                }
            }
            catch
            {
                this._mainWindow.HandleCrashing();
            }
        }