modified register and login APIs to take individual parameters intead of a lump json