Fixed KVStore bugs, and some the download stuff for the login