Added login persistence and a logout button.