implemented registration POST method