Add apiPost() and fix apiGet() to send the correct headers.
Login functionality.

Add the relevant routes and supporting classes to allow a user to log in to the API using the password grant type.
Remove incorrect comment.
Add true to session_regenerate_id() and also redirect the register action to the legacy app for now.
Add the Authorization header to apiGet too for consistency.
Whitespace tidy up and add some docblocks.
Store the client id in the config file.
Pass the access token to the model.

We don't especially want the model aware of $_SESSION.
Remove oauth_callback route from Application controller.

This is not needed as we use the User controller to gain an access token
from the API.
Merge master and fix conflict
stop file_get_contents from throwing a PHP error if the API request fails, we can handle that. Don't send empty content-type with a request with no body
Merge branch 'master' of git://github.com/joindin/responsive into akrabat-login

Conflicts:
	app/templates/layout.html.twig
adding the access token parameter to some other model creation calls