Improve error handling when registering with a taken username or email address.