creat relog function