added login controller; disabled form if invalid