Non-logged in users and content fix and cleaning up code

Fixed users who aren't logged in not being able to see content. Cleaned
up code for task_shortcode.php and added documentation and readability
to the file.