Make the localfs and authentication env a bit more clever