revised query login
Merge branch 'master' into production