Fixed login in and logout bug.