Register user function.