really terrible login implementation

Need to refactor this to use a User model, but I wanted to get it up for people to at least look at.