Added `auth.attempt` event and `attempting` method. Closes #1172.
Re-arranging some code in the application.
Move getConfigLoader into application instance.
More clean-up to foundation start file.
Merge branch 'config'