Added terms to username hash and implemented custom parameters for external keys.