Improved credentials controller