pub fn login(&self, username: &str) {
        let storage = web_sys::window().unwrap().local_storage().unwrap().unwrap();
        storage.set("username", username).unwrap();
        self.state.set(LoginState::Yes);
        self.username.set(username.to_string());
    }
Logs the user in with the given username.
examples/demos/auth/src/global_state.rs