fixed logout issues and completed ID code retrieve