Fix API hanging on /api/posts/:id

Fix the above mentioned issue as well as adds a back button to allow the user to move back to the main page via a click