Toward A More Reliable Power System: Frequency Regulation From Buildings And Secure Estimation Against Cyber Attacks