added login interaction w/ db to client code