refactored authentication methods so they can be called by the apostrophe-cas module which bypasses the usual passport/appy stuff