Added some validation logic for registration and wired up UI components
to Fragment class