Digest fix

Delegated _check_login (child to ) to do digest hashing, maybe this way it is clearer for everyone :)
#283 and #319 mention this.
Also fixed rest_limits so that insertion of lots of unused records is not happening anymore.