Wrote in auto logout code, but it does not work.