fixed signin error and wrote invaild signin tests