fixes #3143 login part

see #3143 for the problem