fix authentication through Rest API, refactored and with test
Merge pull request #19 from greybyte/fix_restframework_auth_2

fix authentication through Rest API, refactored and with test