Fix error handling
Securize login
Add logout