created logout and error handling
Merge branch 'logout'