Added photo input, added security