Registration now gives an error message if input is invalid