function signin(req) {

  app.preloader.show('multi');

  $.ajax({

    type: "post",

    url: base_url + 'signin',

    data: req,

    //    body: JSON.stringify(req),

    //    headers: {"Content-Type": "application/json"},

    success: (res) => {

      if (res.status) {

        localStorage.removeItem('f05_user');

        localStorage.removeItem('f05_data');

        localStorage.setItem('f05_user', JSON.stringify({

          uuid: res.user.data.uuid,

          email: res.user.data.email,

          sess_token: res.user.data.token,

          data: res.user.data

        }))

        localStorage.setItem('f05_data', JSON.stringify({

          data: res.results

        }))

        //app.preloader.hide();

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

        

        setTimeout(() => {

          app.preloader.hide();

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

          window.location.reload();

          console.log('app index ready')

        }, 2500)

        

      } else {

        app.preloader.hide();

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

      }

    }

  })

}