Fixed uploading bug & logging out bug.