fixes #8385 - save last taxonomy on logout

Is the if/else condition necessary here? It seems like
```ruby
user.update_attribute("last_#{taxonomy}", session["#{taxonomy}_id"])
```
would suffice as ```session['randomvalue']``` returns nil anyway. 

Notice you have a typo in the string interpolation to get ```#{taxonomy}_id```