You can use an event which will increment each time a user logs in i.e: s.events="event1"
On addition to that you can use an eVar to track if the user is logged in or not, so you can see later on see if user completed a task while logged in
So the code when the customer logged in will be :
s.eVar1="logged in";
s.events="event1"
When the user is not logged in the eVar1 will have the value logged out.
Once you have implemented that you can run the Site metrics >> custom events .... and set at the top of the report view by hour, or day or week or month. This will give you how many times there were a loggin.