FIX: multithread locking for database creation and access.
REFACTOR: renderSecurityToken => inputSecurityToken.