Almost done with register functionality