I see this behaviour in some desktop applications, where the login button is disabled until the user enters text. I don't recall ever seeing it on a website. It must be used somewhere, but it isn't common.
Is there any reason not to disable it?
If you have a button disabled, selecting it has no action. So if someone has left some text out of a form, you are relying on them knowing that they have to fill all the required fields without any prompt to help them.
If the button is enabled, you can do local validation when someone selects the button and, if there's a problem, provide a prompt or message explaining what the problem is.
I haven't done any testing, but I would think that disabling a login button while required fields have not been filled in for forms very few fields - such as in a login form where there is only a username / password - would be a good idea. In this case it's unlikely that users would be confused as to what they have not filled in, and there is a strong pattern for logging in whereby a username / password is always required.
It generally depends upon the type of users which will be using the system. If the users are novice one, then you should probably keep the button disabled. In case of expert users, there is usually no need of doing this.
From Testing perspective, the login button should always be disabled if the user hadn't entered any of the input data
There is no need to make it disabled. Especially, do not make it look disabled. it is one of the primary actionable goals on any website, so do nothing to discourage its use. Make it attractive and very functional.
I think the login button has two functions:
While disabling the login button would work for the first function, it breaks the second one.
If users enters their username but can’t remember their password, they could simply click at Login, hoping that the system offers them a way to reset the password. The password reset form could pre-fill the username then.
If users can’t even remember their username, they could clickt at Login without filling in any fields, hoping that they end up on the Password forgotten page.
I don’t know how many users use this way (at least I do it more often than clicking on a "Password forgotten" link), but I feel that this "hidden feature" is worth more than the added clarity (if any) by disabling the login button.
Login forms are so common on the Web that almost every user should know how they typically work. Users know that they have to fill in the corresponding fields to be able to login successfully.
So I’d say: don’t disable the login button, instead, use it to lead the users to the password reset page when they only filled in the username or no fields.