**Important:** if using other decorators such as ```@login_required``` provided by the [imperial_ldap package](https://gitlab.doc.ic.ac.uk/paas-packages/imperial_ldap), the parameters to the function appear in inverse order. For example, in the code above, the login decorator appears first, so the ```user``` parameter provided by it goes last.
## Creating a client at login
In you login route, you should create a client for the logged in user by passing in the username and password. This will create a Materials client in the session: