Add logout page
Set token for REST to cookie
Add logout logic
Small bug with connection
Refactoring
PHPDoc for some methods