Add register functionality