Fixes for:

	https://issues.infn.it/browse/VOMS-134
	https://issues.infn.it/browse/VOMS-86
Fix for https://issues.infn.it/browse/VOMS-143