Mnesia database backend for handling users and sessions