private static boolean start(ObjectOutputStream toServer, ObjectInputStream fromServer, Scanner scanner) throws IOException, ClassNotFoundException {
        log.debug("Start method \"start\"");
        System.out.println("1 - registration, 2 - login, 0 - exit");
        String scan = scanner.next().toLowerCase();
        while (!"1".equals(scan) && !"2".equals(scan) && !"0".equals(scan)) {
            System.out.println("Input 0, 1 or 2");
            scan = scanner.next().toLowerCase();
        }

        if ("1".equals(scan)) {
            int registration = ClientLoginHelper.registration(scanner, toServer, fromServer, ACCESS_LEVEL_PASSENGER);
            log.debug("Method \"registration\" returned " + registration);
            if (registration > 0) {
                log.info("Set accessLevel = ACCESS_LEVEL_PASSENGER");
                accessLevel = ACCESS_LEVEL_PASSENGER;
            }
            return registration > 0;
        } else if ("2".

                equals(scan)

                )

        {
            int accessLevel = ClientLoginHelper.login(scanner, toServer, fromServer);
            log.debug("Method \"login\" returned " + accessLevel);
            Client.accessLevel = accessLevel;
            return accessLevel != -1;
        } else

        {
            return true;
        }

    }