fixed ajax call for view profile. Only grabs the first user in the database currently. Waiting for login functionality to apply cookie stuffs. I also changed things in api/index.php, but will not commit or push my changes, but the !empty() functions in some of the control structures cause fatal errors when attempting to hit the api.