public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String login;
        
        boolean bb = false;
        while(!bb){
            System.out.println("Input your Login");
            login = sc.nextLine();
            if(valid(login)){
                bb = true;
                if(showInfo("/S/"+login+".txt")){
                    boolean b = false;
                    while(!b){
                        System.out.println("Input your Password");
                        String password = sc.nextLine();
                        User user = (User) Deserialize("/S/"+login+".txt");
                        if(password.equals(user.password)){
                            b = true;
                            SimpleDateFormat sdf = new SimpleDateFormat();
                            System.out.println( sdf.format(user.lastlogintime) );// old date
                            user.lastlogintime = new Date();
                            System.out.println();
                            System.out.println( sdf.format(user.lastlogintime) );// now
                            Serialize(user, "/S/"+login+".txt");
                        }else{
                            System.out.println();
                            System.out.println("You input wrong password!");
                        }
                    }
                }else{
                    boolean b = false;
                    while(!b){
                        System.out.println("Input your Password");
                        String password = sc.nextLine();
                        if(password.length() > 3 && password.length() < 40){
                            b = true;
                            Date date = new Date();
                            SimpleDateFormat sdf = new SimpleDateFormat();
                            System.out.println(sdf.format(date));
                            User user = new User(login, password, date);
                            Serialize(user, "/S/"+login+".txt");
                        }else{
                            System.out.println("Error Password. Password must contain 3 - 40 numbers!");
                        }
                    }
                }
            }
        }
    }