allow site to correctly parse the correct credential object.
clean up and formatting with additional method edit to simplify.