added simple auth middleware