reorganized javascript, added current user data