Simplifying IsAuthenticated function
Adding a date function for templates to make it easier to format dates and times.