LoginRegister function prototype with jquery created