began solidifying query and login