Modified logout behavior.
Stores user id.