Instead of using hardcoded number, using proper constant/enum values
Sending 401 instead of 200
Merge pull request #178 from matzew/master

status code clean ups