added logout, extended models