Polishing up authentication, still working on buggy DB interaction