Added some sorting code to make sure all records are shown in the
correct order. Sorted on the StartTime.
Current working log is also stored in the database. When the work time
ends the database gets the update.