Check wether sid or passwd is empty first