FINALLY GOT A WORKING EXAMPLE. HOLY SHIT. IT WORKS. I AM HAPPY.
Changed login and logout methods a tiny bit.
Webapp stuff.
Fixing merge errors.