bug fix in user login
queries are private to the user
bug fixes in query owership