I think for what you are asking for - everything is already built into webLoginPE.
For the "first name" and "last name" you can use customtable and customfields in your webloginpe call.
As long as you include the customtable and customfield in the webLogonPE call for then you can define your own template using the custonm fields just like any of the other webLoginPE fields.
For example I have a resource for displaying the user profile - using a custom template ’memProfile’
<p>[!WebLoginPE?
&type=`profile`
&profileTpl=`memProfile`
&customTable=`group_members`
&customFields=`memNumber,surname,initial`
!]</p>
Then in the template I can use
<p> Your Membership number is [+user.memNumber+]</p>
To print out a person’s membership number from the customTable.
Does that help?
Adrian