Remove duplicate code
Controllers; move config from global to app object
Clear other variables on logout
Controllers; move websessions and flashmessages from global to app object