move ajax to app.init