Added verfication to the current user to the function that retrieves the
last task.