Setup logout logic, auto logout and add link
Merge branch 'add-logout'