Added new middleware for remote user backend

Added new middleware for remote user backend in order to support saving of the email address to the database. Without this, when using LDAP, it will not show the user in the user list.