added checking of unique username and email