public static void main(String[] args) throws Exception{
        boolean logged = false;
        while(!logged) {
            try {
                login();
                logged = true;
                System.out.println("Welcome to grading system");
                if(loggedInUser.getPersonType().equals("teacher")) {
                    teacherMainMenu();
                }
                else {
                    studentMainMenu();
                }
            }catch (Exception e) {
                System.out.println(e.getMessage());
            }
        }
    }