implementing loginfile