Small fix to your SQL.
Hardly noticable, but it may have been a character's first login, in that event logout would be null.
Code:
-- Charis start
update lin2world.dbo.user_data
set logout = getdate()
where login > logout
-- Charis end
Becomes
Code:
update lin2world.dbo.user_data
set logout = getdate()
where login > isnull(logout, 0)