updated basic auth filter code