write a login routine.  now need a logout routine.