Update logout code