Implemented potato login (please revert when packaged apps can have origins)