Simplify btrLogin directive
Add unit tests for btrLogin directive