BUGFIX: login was broken when login was required