To answer directly: you can achieve this by using a decision point, with the outgoing paths being the various user roles. After you can retrieve the role as you are doing in your picture using this: https://docs.mendix.com/refguide/xpath-keywords-and-system-variables/#32-user-roles.
If this is desirable frome a security perspective is another topic. This way you let users define the access they will gain to the application. This is a clear security concern. It may be a good idea to reconsider design so that for instance access is predefined on the sign up form. Next to this you could add some validation or approval before the account is created.
Finally, there are some good structures and reusable components here: https://docs.mendix.com/appstore/modules/forgot-password/
Please take a look and see what you can reuse.
Hope this helps!