Added ability to log last login time and create a visit for each login event