MA-520: When set the data forwarding URL (/cases, /forms) in commcareHQ then getting 302 error

Data forwarding URL was redirecting to login. Changing security json.
Also, a fix for /cases: check for matchingNodes

Change-Id: Idca966c3adb38ce0332b24514cd77501f5049d81