app: move some code in the quota handling

Related to #869.
auth: added the ChangeQuota function

This function will change the quota for a user.

Related to #869.
auth: fix some golint warnings