Login Page Condition if/else

Its just simple trial app am trying out.
App has 3 screens. 1.Login 2.Register 3.Submit KM
my question is related to the form fields on the Register page. You reach register page on logging in

Scenario 1: Login screen: if username : “Member” then on Register page pre-populate form fields from .js file where values are stored.
if username on login screen enter with : “admin” : Register page show blank form field.

Can any one please help?