Automatically lock the device after a certain period of time