login functionality - more of it but far from all yet