Bugfixes to js for getting user posts