Just some small improvements

Added PDO defaults. Tidied a user id fetching.