AD: logout funtion added, models representation changed