refactored UI architecture

To see the different behaviors log in using username: user, username:
trainer, and username: owner
To see the different behaviors login using username: user, username:
trainer, and username: owner