authentification fix lib/base.php

authentification fix (Lightning CalDAV etc.)
https://github.com/owncloud/core/issues/1364
http://forum.owncloud.org/viewtopic.php?f=3&t=1894