check login is ok,study js