fixed logging, added logout button