Adding ajax for sensors data