registration functionality works