Improved tests for providers/users controllers.
Improve application controller 401 handling.