Stateded state machine for clocking in and out