implemented find session by user code with tests