Converted encounter form to new security model
Logic fix in user verification.