Added environment param reading for realm key id and realm secret
merging changes