added condition to check if password equals the reentered passwork