The traditional Republican bastions of Long Island crumbled as Lyndon B. Johnson was elected president , Robert F. Kennedy was elected a United States senator from New York , and both houses of the State Legislature were controlled by Democrats .