Added length constraints to authenticate login