You should not generalize it with the Account entity, because, an anonymous user cannot create and account object,
What you should do is, create an NPE and make the anonymous user fill in the registration for the NPE then in the signup button, validate the form and create the account object, give it a user role, and pass the values, from the form and commit it, this way, you will be able to sign up.
You can also, refer to this learning path by clicking on the link below:
Let me know, if you have any issues,
Hope it helps!!!