Made the new login system

Needs some testing since I'm unable to open the database file.