@Override
  public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);

    Activity activity = getActivity();
    if (activity == null) {
      return;
    }

    if (Utils.isCurrentLogined()) {
      Toast.makeText(activity, R.string.sign_up_already_login, Toast.LENGTH_LONG).show();
      updateStatus();
    }

    activity.setTitle(R.string.sign_up);
  }
    @Override
    protected void onPostExecute(Void result) {
      super.onPostExecute(result);
      dialog.dismiss();
      Activity activity = getActivity();
      if (activity == null) {
        return;
      }

      if (err_msg != null) {
        Toast.makeText(activity, err_msg, Toast.LENGTH_LONG).show();
      } else {
        Utils.saveToken(activity.getApplicationContext(), token);
        Toast.makeText(activity, "Register successfully", Toast.LENGTH_LONG).show();
        updateStatus();
      }
    }