Save user when registered

Signed-off-by: Ian Macalinao <ianmacalinao@gmail.com>
Fixed bugs with the registration system.

Signed-off-by: Ian Macalinao <ianmacalinao@gmail.com>