Added hook for Register