adding email argument in regsister and  correcting order function