use $cookieStore instead of $cookies
fix status code
improve regex to match domains
remove morgan logging
code cleanup