Fix crash when uploading without logging in

Regression from #19.