Passes username function to perms decorators

Passing the output of the function returning the httpauth username was
not working because the function could not be resolved when the
decorator was run. As a result, I passed a reference to a function which
would return it instead. This brought new problems. Now, the app loops
the authorization request infinitely.