modifeid if/else in error handling for signup