Added ajax loading to refresh page