Added function handleException

In prepend.php, to be used in error handling
Error handling at answer, deleteq, login, reportq
Error handling at register

Also added handleException() to friends.php's catch