fixing array length in user login