Fixed js bug where user not available