Add locking username, paging and tests for it.