Merge pull request #3 from xufeng123/master

Use carcass.httpError() and fix usage of res.json().
add user in the index file to verify the username and password. test also added