fix left ticket query problem, working on login page
make some logic workin well