Added keystone auth filter and did some refactoring