Excess code

else block is extra code to be processed.  try block can test for authentication and return if successful all in one move.
Merge pull request #12394 from richierichrawr/develop

Excess code