Check an approach:
;
with Q1 as
(
select *, cast(date as datetime) + cast(time as datetime) as dt
from Test
),
Q2 as
(
select *,
case [Action]
when 'Logout' then 0
else datediff(second, dt, lead(dt) over (partition by EmpID order by dt))
end as s
from Q1
)
select EmpID, [Date], [Time], Client, [Action],
concat(
format(s / 3600, '00'),
':',
format((s - (s / 3600 * 3600)) / 60, '00'),
':',
format(s - (s / 3600 * 3600) - ((s - (s / 3600 * 3600)) / 60 * 60), '00')
) as Duration
from Q2
order by EmpID, [Date], [Time]
It should work with durations that are greater than 24 hours. Probably it can be simplified.
Note that it is problematic to order the shown rows that contains the same date and time: 9:00:12. If your real table contains a primary key, for example, then you can add it to order by for lead.