Add login methods and tests