PHOTARK-20 Applying patch from Suhothayan Sriskandarajah with some minor changes.This patch adds the functionality of users registering with PhotArk.