CREATE TABLE Timesheet
etc, UNIQUE (user_ifd,login_timest),
login_timestamp DATTIME2(7) NOT NULL,
The unit of work is a period of time which you are logged in. The duration is defined by a starting point in time and ending point. If the user is still logged on. When you do the query, then leaves a null model. The open end of the interval. This saves us having to kludge things with lead and lag, or even worse things. Too often a newbie will model this with a flag that assigns characteristic of a single temporal column. It mimics a clipboard for you. Check a box for in or out.
Please post DDL and follow ANSI/ISO standards when asking for help.