improved error module. improved logout (w.i.p.)