adding email and local storage functionality