Refactored the login to be metaprogrammed since both logins were basically identical. Added active to schema