Obtain the PZH Web Address and redirect for invitations

This PR improves the invitation process by automatically obtaining the user's PZH WS Address from the PZP.

There are also a couple of bug fixes thrown in for good measure.

Jira issue: WP-852