Finish Sso and change some logic error when build my sql where string