Register user functionality made RESTful