Added login system and database based log