a better way to login(has benn logon)