update the navbar based on the loaded page