Finally got the login process working!

I was worried that I would never figure it out. Seems like I had a few
logic errors laying around. Things are working better now, I have yet
to implement the main menu or any of the account functions yet but I
figured this was as good a stopping point as any.