public String execute() {
        String actionResult = "";

        try {
            DataService dataService = new DataService();

            Map param = ActionContext.getContext().getParameters();
            if (!param.isEmpty()) {
                String[] paramValueArray = null;
                paramValueArray = (String[]) param.get("password");
                password = paramValueArray[0];
                paramValueArray = (String[]) param.get("uemail");
                uemail = paramValueArray[0];
                log.info("In LoginAction : " + uemail + "   " + password);
            }            
            
            // User user = dataService.getUserInfo(getUserId());
            User user = dataService.authenticateUser(uemail, password);
            log.info("user object  ::: "+user);
            //Put User to session.
            Map<String, Object> session = ActionContext.getContext().getSession();
            session.put("USER", user);
            if (user != null) {
                if (user.getActive() != 1) {
                    addFieldError("uemail", "You has been deactivated by your Admin.");
                    actionResult = "incative";
                } else {

                    if (user.getUemail().equalsIgnoreCase(uemail) && user.getPassword().equals(password)) {
                        //valid user.
                        log.info("user profile in Login action -->" + user.getUprofile());
                        setList(dataService.getLiveLocation(user));
                        // setLatitude(TrackData.getLatitudeList());
                        // setLongitude(TrackData.getLongitudeList());

                        setCurrentUserName(user.getFname() + " " + user.getLname());
                        if (user.getUprofile() == 1) {
                            actionResult = "individual";
                            setCurrentUserName(getCurrentUserName() + " [I]");

                        } else {
                            if (user.getUprofile() == 2) {
                                actionResult = "group";
                                setCurrentUserName(getCurrentUserName() + " [G]");
                            } else {
                                if (user.getUprofile() == 3) {
                                    actionResult = "admin";
                                    setCurrentUserName(getCurrentUserName() + " [A]");
                                }
                            }
                        }
                        //actionResult = SUCCESS;
                    } else {
                        log.info("invalid user.");
                        actionResult = INPUT;
                        addFieldError("uemail", "Invalid email ID or password");
                    }
                }
            } else {

                actionResult = INPUT;
                addFieldError("uemail", "Invalid email ID or password");
                log.info("Invalid email ID or password");
            }
        } catch (Exception e) {
            log.info("Exception ::::::::  "+e);
        }
        return actionResult;

    }