changed protocol
added lock for user