Added registration functionality.