JSON credentials storage and authentication