added automatic logoff