added authenticate check when changing password or email