Added check that metadata is for the right entity id.
- Changed back incorrect rename of idp destinationuri.