Catch padding errors when base64 decoding client secrets

Currently certain malformed OAuth headers can cause a 500 server response due to an uncaught exception when base64 decoding improperly padded values. This PR fixes that problem.