Some security fixes.
Changed authentication to DIGEST.
Reorganized the code and added application class.
Added annotation-based security and forced user authentication