Proper cookies for auth, SHA-512 hashed passcodes.

more stuff I'm sure