implemented registration for user