Adding registration functionality