Implemented session check