OK button only enables when Username and Password are non-empty
Added some error codes