#JC-1422
Enabled optimistic locking for the JCUser entity.
Added lock handling for the login action.