clean up login tests. add produce_id_matrix method and tests