updated code to integrate with UI

Finished the code that populates drop down menus and checks if a user is
logged in on page load.