added modular auth

New commit.