Use a subarray of data for auth check if one matching the auth model exists.

Fix tests

Fix line endings