added code to generate the main screen dynamically depending on the type
of user