 	end; 
 $test$ language plpgsql;
 
+create or replace function shutdown_20_users()
+returns setof text as $test$
+	begin
+		drop function if exists users.new_test_users();
+		drop function if exists users.active_test_users();
+		drop function if exists users.inactive_test_users();
+	exception
+		when invalid_schema_name 
+			or undefined_function 
+			or undefined_table 
+			or undefined_column then
+			--do nothing
+	end;
+$test$ language plpgsql;
+
 create or replace function test_users_schema()
 returns setof text as $$
 	begin 

create or replace function test_users_function_add_user_inserts_data()
returns setof text as $test$
	declare
		newusercur		cursor for select users.test_user.name
							from users.test_user
							left outer join users.user on 
								(lower(users.test_user.name) = 
								users.user.name)
							where users.user.active is null;
		user1			text;
		holder			text;
	begin
		open newusercur;
		fetch from newusercur into user1;
		select add_user into holder from
			users.add_user('web-session-1', user1, 'password',

create or replace function test_users_function_validate_activates_user()
returns setof text as $test$
	declare
		newusercur	refcursor;
		user1		text;
		holder		uuid;
	begin
		select new_test_users() into newusercur;
		fetch from newusercur into user1;
		select add_user into holder from
			users.add_user('web-session-1', user1, 'password',
