Added sql minimum date generation (set to 1970-1-1 00:00)
login() stores event authentication details (last login, locked, ...) in database