Registration template, algorythms of reg/auth