Fixed registereNewUser(...)

Added the if($this->databaseConnection()){ ... } to the registerNewUser( ... )  function. WIthout it the program breaks