Refactored authenticated policy and added better log on errors.
Refactored authenticated policy and added better log on errors.

simman/Taskboard,simman/Taskboard,tarlepp/Taskboard,tarlepp/Taskboard,simman/Taskboard,tarlepp/Taskboard