Added new QueryWithLogin class and removed unnecessary methods