Refactor store to take authentication directly.

Also includes lots of fixes around opening folders.