in the middle of implementing login. next step is generalizing it