Fix launch on login stuff to support sandboxing