added ajax loading animation and fixed a refresh bug I made on the picture reload button