Changed module_authenicate function to accept check/reply pairs