updated pam conf file and fixed bugs