Fixes validation of login