Only capture profile and populate registration from profile for logged in users.
This commit is not functionally part of this branch, but is being done here as the mods are to code already diverged enough from the master as to make a later merge possibly difficult (and this branch is already rebased with the master).