Unless you mean from with xenforo itself? The way I've done it is external to Xenforo.
Though I am having one problem with what I put in that post. It's only logging me in if I use the remember me box. It doesn't see me as logged in when that box isn't ticked (the details still authorize but it just thinks I'm not logged in) :S. For the life of me I can't see what I'm doing differently from the core code.