Databases:
You can use IndexedDB API, which allows you to store a database in the client's storage (subject to their own policy restrictions), and efficiently index it even if it contains many items.
If you want to keep your database on your server you can do whatever you like there.
* How do you manage user accounts ?
As far as I understand, the device is assumed to have a single user. If multiple users can exist, they each have their own copy of the game which shares no data with the others (similar to, e.g. on Windows if you ran the game in a web browser).
If you mean server-side, then you can do it in any way you like. You can use localStorage to store the user's credentials then contact your server to do synchronisation or anything else you like (suppose you have a locally-runnable game, but you want to share "achievements" or some stuff like that).
* How do you use I/O ( which JS isn't good at ) ?
A variety of different ways depending on what you want. JS is fine at IO.
For loading "generic content", your game is simply a web application which happens to be loaded into the device memory for offline use. Therefore you can
a) Just ignore IO, and when you reference an image, it will lazily be loaded from the offline content store (NB: This is not a good idea in most cases, as your game might start playing before all its contents loaded, which will cause the player some confusion, especially if they are attacked by an enemy which isn't loaded yet)
b) Preload images etc, in the standard manner of a web application (You can create an Image object and set its .src property) (you can use "load" events to detect when they have completed loading; you can display a splash screen, loading progress bar etc)
c) Load other types of content using the respective APIs, for example load text files using XMLHttpRequest object (which is badly named; it can be used for non-XML content).
There is no "POSIX IO" API, you can't use open(), read(), close() to load a file. Javascript doesn't use these paradigms, but it doesn't mean it can't do IO.