Fixed problem with logout handling.