user_exists is no longer defined as a global function