Make sure state.is_recording is always correct.

previously it was never set to False after a recording.
fix login popup to appear at the right times.

also remove timeout stuff as it is not needed any more.