Realtime decoding with state space models of neural activity