EAGLE-1071 Login form takes empty entries
fix js

https://issues.apache.org/jira/browse/EAGLE-1071

Author: @VSJTech
Reviewer: @zombieJ

Closes: #972
diff --git a/eagle-server/src/main/webapp/app/dev/public/js/ctrls/authCtrl.js b/eagle-server/src/main/webapp/app/dev/public/js/ctrls/authCtrl.js
index e4b3329..36093c9 100644
--- a/eagle-server/src/main/webapp/app/dev/public/js/ctrls/authCtrl.js
+++ b/eagle-server/src/main/webapp/app/dev/public/js/ctrls/authCtrl.js
@@ -26,6 +26,14 @@
 		$scope.password = '';
 
 		$scope.login = function () {
+		if (!$scope.username || !$scope.password)
+        					{
+        					$.dialog({
+                            	title: 'OPS',
+                            	content: 'Username or password cannot be Empty.'
+                            });
+
+        					}else {
 			Auth.login($scope.username, $scope.password).then(function (result) {
 				if (result) {
 					$wrapState.go('home');
@@ -35,7 +43,7 @@
 						content: 'Username or password not correct.'
 					});
 				}
-			});
+			}); }
 		};
 
 		$scope.onKeyPress = function (event) {