Fix login issues

see #270