Added validator class and made a few changes on global settings (log and session).