Added registration functionality to the API