[#27065] Add a try..catch to prevent 500 error on login failure

See: http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=27065