User is now a pointer, so doing User.xxx will make an error nil pointer dereference. So we have to check that User is not nil