abstract out window.userDetails