support ajax login
Merge pull request #5 from jhkchan/master

Support AJAX login and logout