make navigateTo function better. properly logout a user.