added login routine.