Add logoff function. Add Appointment database handlers.