Fix wrong authentication that prevented successfull logins