picture downloading script and a first attempt at oauth