fix the preview_reg and preview_login