organisation.owner might be nil sometimes.
Remove Thread.current hackery
Decouple authorization from authentication
Clean up current_user getter
Decouple credentials look up from login operation
Add OAuth login credentials look up
Only set credentials in SessionsController
The actual login is now performed in `require_login` before filter
Render JSON error on Authorization error for JSON requests
Show `t('flash.session.login_successful')` on first successful login
Remove deprecated `organisation_owner?`
Move OAuth detection and token parsing to `oauth_credentials`
Return parsed dn from User.uid_to_dn(uid)
Fix crash current_user OAuth test
Add OAuth token manager
Add spec runner to Rakefile
Use token manager to parse OAuth headers
Load OAuth config
Save requested path for the duration of the login procedure.
Show requested path on login page.
Fix up for saving requested path.
We already had methods for this...