[#42743165] Add unique index for user login
Don't look for logged in users when there is no user_id