Opens a session for the user
        :param username: Username
        :param realname: User real name
        :param email: User email

def connect_user(self, username, realname, email, language):
        """
        Opens a session for the user
        :param username: Username
        :param realname: User real name
        :param email: User email
        """

        self._database.users.update_one({"email": email}, {"$set": {"realname": realname, "username": username, "language": language}},
                                        upsert=True)
        self._logger.info("User %s connected - %s - %s - %s", username, realname, email, web.ctx.ip)
        self._set_session(username, realname, email, language)
        return True