retab LogUser
create cookie session helper
redirects the url to the correct path
fix url parameter to match caller
logout the session correctly