Add authentication logic to use block... ugly