try this for the formula...
if instr({table.logintextfield},"logged in")>0 then 1 else
if instr({table.logintextfield},"logged off")>0 then -1 else 0
For your Running Total:
Right click on Running total and select NEW
Name it "LogCounter"
Field to summarize is : your formula field from above
Type of summary: SUM
Evaluate : for each record
Reset: Never
Place this on your details row and assuming the formula is fixed you should see it sum incrementally.
For a final total after the last record do insert summary as a SUM on the formula field and palce it in the report footer or just the RT field in the footer (as well as the details).