PHOTARK-20 Applying patch from Suhothayan Sriskandarajah.This patch contains improved basic authorization module for PhotArk