fix bugs, added button for uploading image to server