Rest API for user registration