Login functionality

Sheesh i'm looking at the diff and it looks like i'm still bouncing around in ALL THE FILES. basically this makes the login work.