Improved username / password handling