Nov 17, 2016 07:14 AMfirstname.lastname@example.org|LINK
You could set a breakpoint to debug your code and make sure the registeredUser.Id is not null.
The data protection operation was unsuccessful. This may have been caused by not having the user profile loaded for the current thread's user context, which may be the case when the thread is impersonating
Besides, for this error, you could check the following thread: