function signup(req) {

  app.preloader.show();

  $.ajax({

    type: "post",

    url: base_url + 'signup',

    data: req,

    success: (res) => {

      if (res.success) {

        remove_localstorage('member');

        set_localstorage('member',res.member.data)

        app.preloader.hide();

        app.views.main.router.navigate('/');

      } else {

        app.preloader.hide();

        app.dialog.alert(res.message, 'SignUp Failed');

      }

    }

  })

}