Replaced Filter with servlet.

Servlets (and Filters) are singletons, hence instance variables might be overwritten, which lead to a race condition.

While changing to a Servlet does not fix the bug itself, it leads to a cleaner design anyway.