Automatic emergency lantern for power failures