saving registration to db