Added validation to the signin and debugging logs.