ui: better handling for PAM