Updated logout script