Pill bottle automatic close