added logout function and changed defaultRoute to logout so if there is an errer with controllers the session will be destroyed