Merge pull request #21 from huxuan/master

Add *.swp into .gitignore.
Bug fix for login at index page. Fix #22.