Decorator to abort if login is not allowed
    :param f:
    :return:

def require_login_allowed(f):
    """
    Decorator to abort if login is not allowed
    :param f:
    :return:
    """

    @functools.wraps(f)
    def deco(*a, **kw):
        if not __options__.get("allow_login"):
            abort(403, "Login not allowed. Contact admin if it's a mistake")
        return f(*a, **kw)

    return deco