Additional error handling / feedback + CSRF token get before login

After testing a lot with a standalone REST client I noticed that logins fail when doing it multiple times. This can be fixed by getting and using a CSRF token beforehand.