Updated login and customer to use queries.