:beg
N
s/accepted/accepted/
t next
s/Connection from \([^\n]*\)/Invalid login from \1/
P
D
b beg
:next
s/Connection from \(.*\) port [0123456789]*\n\(.*\) authentication for \(.*\) accepted./\3 logged in from \1 with\2 authentication/p
