public User loadUser(String login, String pwd) throws ProfileExceptions {
    	User loadedUser = null;
        try {
            String defaultPath = new File("").getAbsolutePath().toString()
            		+ mainStructure;
            DirectoryStream<Path> stream = Files.newDirectoryStream(FileSystems.getDefault().getPath(defaultPath));
            for(Path path:stream) {
                if(path.getFileName().toString().contains(login) && (new File(path.toString())).isDirectory()) {
                    if(readAuthFile(path.toString(), pwd)) {
                        try {
                            FileInputStream saveFile = new FileInputStream(path.toString()
                                    + profileStructure
                                    + login + ".ser");
                            ObjectInputStream ois = new ObjectInputStream(saveFile);
                            loadedUser = (User) ois.readObject();
                            ois.close();
                            saveFile.close();
                        }
                        catch (ClassNotFoundException ex) {
                            Logger.getLogger(FileParser.class.getName()).log(Level.SEVERE, null, ex);
                        }
                    }
                }
            }
        } catch (IOException ex) {
            Logger.getLogger(FileParser.class.getName()).log(Level.SEVERE, null, ex);
        }
        return loadedUser;
    }