Implemented logging out.