function signin(req) {

  app.preloader.show('multi');

  $.ajax({

    type: "post",

    url: base_url + 'signin',

    data: req,

    success: (res) => {

      if (res.success) {

        remove_localstorage('member');

        remove_localstorage('member_img');

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

        set_localstorage('member_img',res.img.data);  

        sites();  

        sections(); 

        latest_bysite();

        latest();

        latest_bysection();

        latest_bywho();

        who();  

        //news(24,'','','','','');

        setTimeout(() => {

          app.preloader.hide();

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

          window.location.reload();

          console.log('app index ready')

        }, 1500);

               

      } else {

        app.preloader.hide();

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

      }

    }

  })

}