changing login query to work with Android app