switch db to postgres / add user login/logout