login&register logic module