Class 8 - cleaning up code - logout function