added secret capture during reg