added pclogger and changed login code