updated destroy user session function