logLogin function added, not complete.