adds navbar functionality
refactors login