v2: using db and login (sessions)